1

After reading the official documentation about doze mode in Android, is someone know how music app technically can stream track from Internet when the device enters in doze mode (so network is unavailable) ?

Hasina
  • 335
  • 3
  • 13
  • 1
    Have a foreground service and that will make sure even if the phone goes into doze mode, your app will stream the music continuously. – Srikar Reddy Jan 18 '19 at 11:26
  • there are multiple ways to acquire wakelocks. just acquire a wakelock (jobintentservice does this automatically for eg)before you start streaming and the device won't sleep. just be sure to release the lock when your streaming stops otherwise users will uninstall your app due to apps like greenify reporting it as a problem – Karan Harsh Wardhan Jan 18 '19 at 11:51
  • @KaranHarshWardhan As documentation said, wakelocks are ignored by System. So it is not a solution. – Hasina Jan 18 '19 at 14:10

0 Answers0