My app plays streamed audio in the background using Exoplayer but the system is shutting it down if the user doesn't whitelist us manually in the battery optimization settings.
There are other apps also running streamed audio in the background successfully without interruptions and without whitelisting in the battery optimization.
This is the code to take the user to settings app, with some instructions on how to do it. But each system has its own way / path to disable the battery optimizations, making our instructions not always accurate:
Intent myIntent = new Intent();
myIntent.setAction(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS);
startActivity(myIntent);
Is There a way to whitelist us without prompting the user and be accepted in the review process? Or is there another way to avoid the system shutting down our streaming?
Thank you!