We need to track location of the device and need to run it periodically (we need to get updates, even when the device is not moving).
For this purpose we are using background fetch with this config
BackgroundFetchConfig(
minimumFetchInterval: 15,
requiresBatteryNotLow: false,
requiresCharging: false,
requiresStorageNotLow: false,
requiresDeviceIdle: false,
requiredNetworkType: NetworkType.NONE,
),
And it's working when the screen is on or the device is charging (tasks runs every 15-30 minutes), but the moment you unplug the phone - tasks stop from firing.
We need it to run every 15-30 minutes even when the device is unplugged (at least with high battery level)
The device is not in power saving mode.
What are we doing wrong?