Context: I am using an iOS controller, with a custom media player which is a lightly customized version of the CustomPlayerSample.
After a fresh install, everything works as normal, the controller detects the player on the Fire TV device. But if I leave the player alone for over 30min, it becomes undetectable from the controller (e.g. the DiscoveryListener's deviceDiscovered() is never called - even though the InstallDiscoveryListener's installServiceDiscovered() is called and the version of the installed package is successfully retrieved).
I performed a similar test using the unaltered CustomPlayerSample. The player service was killed after 30min of inactivity as well, but it remained discoverable as normal after the 'kill' event.
So, it's pretty clear that there is an issue with the customizations made to CustomPlayerSample, but because the Fling discovery is a black box from the perspective of app developers, I am not sure where to look for candidate culprits. One hint I believe is the last line for the log extracts copied at the bottom of this message "DefaultService - Failed to create Description during DefaultService creation for service xyz" because this error did not show up when attempting to reproduce with the unaltered CustomPlayerSample.
Can someone help me make sense of this error message, and possibly provide pointers for troubleshooting?
-------------------- Extract from the logs (this is when the service gets killed, after 30min of inactivity) -------------------
02-03 17:12:51.309 482-498/? I/ActivityManager﹕ No longer want com.swishly.webtv.fireosplayer (pid 22457): empty for 1803s 02-03 17:12:51.329 482-493/? W/ActivityManager﹕ Scheduling restart of crashed service com.swishly.webtv.fireosplayer/.WebTVPlayerService in 5000ms 02-03 17:12:56.329 482-498/? I/ActivityManager﹕ Start proc com.swishly.webtv.fireosplayer for service com.swishly.webtv.fireosplayer/.WebTVPlayerService: pid=6054 uid=10004 gids={50004, 3003, 1028} 02-03 17:12:56.679 6054-6085/? E/WhisperLink﹕ TcommSettings - Exception obtaining value from settings cachecom.swishly.webtv.fireosplayer does not have the permission to read device settings; 02-03 17:12:56.829 6054-6085/? E/WhisperLink﹕ TcommSettings - Exception obtaining value from settings cachecom.swishly.webtv.fireosplayer does not have the permission to read device settings; 02-03 17:12:56.879 6054-6087/? E/WhisperLink﹕ DefaultService - Failed to create Description during DefaultService creation for service com.swishly.webtv.fireosplayer;