flutter_background_fetch
flutter_background_fetch copied to clipboard
[BUG] Documentation does not describe return values of `configure`
Your Environment
- Plugin version:1.1.0
- Platform: Android
- OS version:11
- Device manufacturer / model: OnePlus 7
The documentation for this plugin doesn't describe the return values of configure
or what failure cases may occur.
I see configure
repeatedly returning 2
. Another ticket seems to suggest this might mean "denied" but I can't find any documentation on this.
What do the return values mean? If 2
means "denied", what can cause this?
For iOS you can deduce from here that an integer response (2) is UIBackgroundRefreshStatusAvailable .
For Android it seems to be always 2: https://github.com/transistorsoft/transistor-background-fetch/blob/master/android/tsbackgroundfetch/src/main/java/com/transistorsoft/tsbackgroundfetch/BackgroundFetch.java#L37
https://github.com/transistorsoft/transistor-background-fetch/blob/master/android/tsbackgroundfetch/src/main/java/com/transistorsoft/tsbackgroundfetch/BackgroundFetch.java#L208
This is the flutter side: https://github.com/transistorsoft/flutter_background_fetch/blob/master/lib/background_fetch.dart#L391
Yes, the docs could be improved.
yes, status 2
means all good
Only iOS has a mechanism via Settings for disabling background-fetch events. Android has no such mechanism for disabling, so is always 2
what about BackgroundFetch.registerHeadlessTask()
?
What about it?
it returns bool - what does it mean?
Means it was successful?
I guess, asked to be sure, thanks
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.