'Media controls not working on boot in Android 11+
I made a simple media player app that plays audio streams from the URLs. It has a button to play and pause the audio. I also added media controls at the push notification area with a button to play and pause the audio. I've test the app on different Android versions, and the media controls works as expected. But if I reboot the device, and open the app immediately. The media controls stops working for several minutes, clicking the button does not play or pause the audio. This only happens on Android versions 11 and above. It works fine on Android 10 and below. I guess Google has changed the media controls behavior since Android 11. I've tried to add the RECEIVE_BOOT_COMPLETED permission and BOOT_COMPLETED receiver intent-filter action in the AndroidManifest, but this still does not fix the issue. Can someone help me to understand the new implementation of the media controls?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
