You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case does not involve creating notifications, but It seems that I can't initialize the FlutterBackground object without generating a notification. I see how the default constructor for FlutterBackgroundAndroidConfig includes dummy values for a notification, but does the 'initialize' call to the MethodChannelnecessarily generate a notification?
The text was updated successfully, but these errors were encountered:
Yes, unfortunately a foreground notification is required by Android to enable foreground services used by this plugin. See here for more information on that.
What exactly are you trying to achieve? Maybe there is a way without a notifications requirement to achieve it...
@JulianAssmann ah, I see. I simply need to keep the app alive for periodic sensor data acquisition (users are aware of this and agree, it's a research app). I actually do want to created notifications when the app is backgrounded under certain logical conditions, was just curious if that first notification was necessary. Now I understand. Thank you.
And thanks for this plugin. Keep-alive is so tricky and for Android this makes life much easier.
Yes, it's really confusing on Android, I agree. But at least it's possible at all (looking at you, iOS :))
However, if you only want to execute some code periodically, there is the option of so called WorkManagers and there is even a workmanager plugin for it in Flutter. Maybe this is enough for you.
My use case does not involve creating notifications, but It seems that I can't initialize the
FlutterBackground
object without generating a notification. I see how the default constructor forFlutterBackgroundAndroidConfig
includes dummy values for a notification, but does the 'initialize' call to theMethodChannel
necessarily generate a notification?The text was updated successfully, but these errors were encountered: