Hi, I’m making an amazing online music player, but i need to reproduce the next song when the first one is finished, all this need to happen while the phone screen is locked.
This is the procedure I want to execute, I’ve been trying some extensions like Idle Mode from @bodymindpower and it does not work when the screen is turned off more than 1 minute…
The problems with streaming / radio apps have been discussed intensively and extensively in all forums (AI2, Kodular, …) for years (also with the MIT and Kodular staff). Search the appropriate forums. I made a final statement on this and presented the solution, after testing this on dozens of devices and all Android versions from KitKat onwards.
So search the forum (and the corresponding other forums) and you will find what you are looking for.
A Background Task has nothing to do with that. It has no effect on Doze mode.
But I finally found your post Keep Alive Extension I dont know how much I’m grateful for you.
I just start the KeepAlive extension when the user turns off the screen, and stop the extension when user turn back on the phone screen so the notification isn’t visible for the user. If there’s a better way to do it, please let me know.
Also stay tuned for the music app I’m doing here’s some screenshots
First I combined your Idle Mode extension to know when the phone screen is off, and the Keep Alive extension to create a foreground task so the Doze mode cannot be activated by the system.