Search code examples
chromecastgoogle-cast

Is WakeLock needed for Chromecast apps?


I have noticed some Chromecast apps ask for a WakeLock permission. Is this something that is required for the Chromecast SDK to work well or are these apps just asking for it because they might be using the phone as the video server?

Thanks.


Solution

  • WakeLock is not required explicitly for an application that uses cast (at least not for cast related stuff); Cast SDK internally handles that and it is not a good practice for the applications to hold such a lock in general. There is no reason to keep the connection for an extended period of time; if, for example, phone goes to sleep and wifi radio loses its connection; the app should be able to recover its previous state upon waking up.