Greetings,
I'm using an unusual title to this thread because we are having a problem with Samsung S10 devices running Android 11. We are not sure if the problem is with Samsung or Android 11 or a combination of both, but it's causing many of our customers to complain that audio on existing applications that they have stops playing. This affects only app we made for them.
Here's what I know so far from experimenting with my S10+ phone. After compiling any of our apps and running them, the audio will be ok for a few days, then everything went downhill. The audio will start to stutter, then stop completely. This behaviour only started after I updated the phone to Android 11. I went online and they suggested to disable battery management and add the apps to the "apps that don't sleep" list and wipe the cache partition which I did. It was only a temporary fix. A few days later the audio had the same problem. This also did not affect any of the stock Android apps but did affect my WhatsApp app and some others but not all of them. When the apps are not working like this, the audio will occasionally turn on randomly for about 15 seconds then stop.
I can buy some time, by recompiling and running any of our apps and the audio will be good for about 3 days before it starts to go downhill. We searched online for many days but can't find a way online to combat this problem. All we find is other people complaining on blogs and forums about it.
The only way to keep the audio running on any of our apps was to connect the phone to an external power source or just turn on the screen without opening up any of the apps. That's why we came to the conclusion the Samsung battery management is the cause.
This issue is only happing to S10 phones running Android 11.
All of our apps use the following code in a service module that is set to start up if the phones are restarted. Maybe there is some extra coding that needs to be added?
I'm using an unusual title to this thread because we are having a problem with Samsung S10 devices running Android 11. We are not sure if the problem is with Samsung or Android 11 or a combination of both, but it's causing many of our customers to complain that audio on existing applications that they have stops playing. This affects only app we made for them.
Here's what I know so far from experimenting with my S10+ phone. After compiling any of our apps and running them, the audio will be ok for a few days, then everything went downhill. The audio will start to stutter, then stop completely. This behaviour only started after I updated the phone to Android 11. I went online and they suggested to disable battery management and add the apps to the "apps that don't sleep" list and wipe the cache partition which I did. It was only a temporary fix. A few days later the audio had the same problem. This also did not affect any of the stock Android apps but did affect my WhatsApp app and some others but not all of them. When the apps are not working like this, the audio will occasionally turn on randomly for about 15 seconds then stop.
I can buy some time, by recompiling and running any of our apps and the audio will be good for about 3 days before it starts to go downhill. We searched online for many days but can't find a way online to combat this problem. All we find is other people complaining on blogs and forums about it.
The only way to keep the audio running on any of our apps was to connect the phone to an external power source or just turn on the screen without opening up any of the apps. That's why we came to the conclusion the Samsung battery management is the cause.
This issue is only happing to S10 phones running Android 11.
All of our apps use the following code in a service module that is set to start up if the phones are restarted. Maybe there is some extra coding that needs to be added?
Inside the service module:
Sub Service_Create
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_WHEN_NEEDED
lock.PartialLock
lock.KeepAlive(False) ' Don't keep the screen on but keep the app alive.
End Sub