Mirroring media or casting video content from an Android device to a smart TV or Chromecast dongle often terminates abruptly the moment the smartphone display times out or the power button is pressed. While casting protocols are designed to operate independently in the background, aggressive manufacturer battery optimization killers (common on Samsung, Xiaomi, and OnePlus) terminate Google Play services network sockets to conserve power.
Set Google Play Services and Cast App to Unrestricted Battery
OEM power managers aggressively kill background streaming daemons once the display turns dark:
- Navigate to Settings > Apps > See all apps.
- Locate and tap the application you are casting from (such as YouTube, Chrome, or Google Home).
- Select Battery (or App battery usage).
- Change the setting from Optimised to Unrestricted.
- Repeat these steps for Google Play services to maintain socket keep-alive packets.
Prevent Wi-Fi Sleep State Disconnections
Some Android builds enter aggressive Wi-Fi power saving states during screen lock:
- Open Settings > Network & internet > Internet > Network preferences.
- Ensure Turn on Wi-Fi automatically is active.
- In Developer Options, toggle on Wi-Fi non-persistent MAC randomization or disable Wi-Fi scan throttling to ensure continuous background network beacons.
Disable Adaptive Battery Standby Buckets
Adaptive Battery groups apps into standby buckets that halt network activity. In Settings > Battery > Adaptive preferences, temporarily disable Adaptive Battery to verify seamless background playback.