Battery saver still disabled in settings after showIgnoreBatteryOptimizations
Your Environment
- Plugin version:
- Platform: Android
- OS version: 9.0
- Device manufacturer / model: Xiaomi Note 7
- React Native version (
react-native -v): 0.60.4 - Plugin config
reset: true,
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
disableElasticity: true,
distanceFilter: 0,
locationUpdateInterval: 1000,
stopTimeout: 1,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_OFF,
stopOnTerminate: true,
startOnBoot: true,
autoSync: true,
batchSync: false,
autoSyncThreshold: 0,
foregroundService: true,
url: SERVER_URL,
allowIdenticalLocations: true,
params: {
device: {
uuid: (DeviceInfo.getModel() + '-' + DeviceInfo.getSystemVersion()).replace(/[\s\.,]/g, '-'),
model: DeviceInfo.getModel(),
platform: DeviceInfo.getSystemName(),
manufacturer: DeviceInfo.getManufacturer(),
version: DeviceInfo.getSystemVersion(),
framework: 'ReactNative',
},
},
Expected Behavior
If we disable battery optmization, after showing showIgnoreBatteryOptimizations(), and isIgnoring became true, and we go back in the android settings (through "app"), we should still see that the battery saver is disabled.
Actual Behavior
When we disable the battery optimization in the settings, after showing showIgnoreBatteryOptimizations(), and isIgnoring became true, if we go in the android settings (through "app"), we still see that the battery saver is enabled.
Steps to Reproduce
showIgnoreBatteryOptimizations()withBackgroundGeolocation.deviceSettings.show(request);- Going to the battery optimization settings page
- Disabling battery optimization on the app
- Going in the android settings (through "app"), we still see that the battery saver is enabled.
Context
Disabling battery optimization in the Android settings
The plugin isn't involved with changing any actual settings. It only provides the ability to re-direct the user to that screen.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.