When I use the Spotify Android SDK to play music and Doze kicks in, the music stops playing because the app loses network connectivity. Is there a way to solve this?
The only way I can think of is ask the user to whitelist the app using a ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent. But I read that a lot of developers get their app banned from the play store when doing that.