chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.67k stars 109 forks source link

Disable Disable battery optimization #422

Closed MikuChan03 closed 1 year ago

MikuChan03 commented 1 year ago

Hello.

After enabling the "Disable battery optimization" option, the field is grayed out, meaning I can't disable it again. Even after uninstalling the App in Magisk, this doesn't change. What can I do to disable the disable battery optimization option? Thanks

chenxiaolong commented 1 year ago

This is something that can only be changed in Android's settings. It's dumb that it was designed this way. Android only has an API that apps can use to request that setting to be turned on, but not to turn it off.

On Google Pixels and other less customized ROMs, the setting is at Settings -> Apps -> BCR -> App battery usage (Optimized == off, Unrestricted == on). For other devices, you'll likely have to dig around to find the equivalent option.

MikuChan03 commented 1 year ago

Ok, many thanks. On the moto g73, which mostly has stock android 13, it's just as you said. Still, I would have never figured that out on my own. The "Pause app activity if unused" would have been my first guess. Maybe you can add an image or mention the battery submenu or something? Anyways, have a nice day.

chenxiaolong commented 1 year ago

That's a great idea. I'll dig around and see if there's a way BCR could open Settings to the correct page. If not, at the very least, I'll stop graying out BCR's option and make it show a message when the user tries to turn it off.

chenxiaolong commented 1 year ago

This is fixed in #424, which will be included in version 1.52. The option will no longer be grayed out. When the user tries to disable it, BCR will open Android's Settings to the correct page.