flutter_foreground_task
flutter_foreground_task copied to clipboard
Urgent: Foreground is stopped working when device is lock and not charging
I added these permissions
// App is asking about this permission await FlutterForegroundTask.requestIgnoreBatteryOptimization();
also I put these channelImportance: NotificationChannelImportance.HIGH, isSticky: true, priority: NotificationPriority.HIGH,
but when my device is not charging and it's lock, foreground not working, it is working when I enter to app again, if my phone is charging, it will works fine even if my device is lock
???
@Tahahalabi . Some device manufacturers kill apps regardless of anything and everything. You either have to disable your manufacturers battery saver from the settings. Please take a look at https://dontkillmyapp.com. @Dev-hwang i recommend this issue closed.
No problem didn't solve yet, so issue will not be closed
I checked what you sent, it's not a solution, my app is asking for the battery permission to reject it
It seems to be related to doze mode. Some device may require the android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission.
Are you using another plugin in your implemented TaskHandler? Or are you using the network?
no I'm only using your plugin
There is another plugin for background installed but I'm not using it
I told you I'm using this android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS