bkonyi / FlutterGeofencing

Rough work for Flutter geofencing plugin
BSD 3-Clause "New" or "Revised" License
337 stars 219 forks source link

A way to keep the geofence manager alive after app termination #58

Closed MahmoudEzzatAbdul-Rahman closed 3 years ago

MahmoudEzzatAbdul-Rahman commented 4 years ago

I've tried scheduling jobs using android_alarm_manager to keep the geofence manager initialized but it doesn't quite work correctly, is there a reliable way to keep the geofence manager running after app termination?

bkonyi commented 3 years ago

You'll need to run things in a foreground service for long-running background work. The plugin has promoteToForeground which achieves that, but it might be a bit restrictive as this plugin isn't meant for production use.