Turn off App-Info Battery Optimization from Kotlin
I am running an app which needs to run a service in the background using IMU (accelerometer and gyroscope data) in the background, while the app is in background and the screen is off. After sometime, the IMU data stops as Android pushes the app into background. I need to disable this from inside Kotlin.
As of now, the only way I found is to redirect the user to
However, from here setting the app battery settings to Do-not-optimize is different...