bkonyi / FlutterGeofencing

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

Fails to detect state change automatically #10

Closed frextrite closed 5 years ago

frextrite commented 5 years ago

The package fails to detect GeofenceEvent.dwell state automatically. To manually trigger it I need to first open Google Maps app and then switching back to the Geofencing app it detects the dwell state.

And similarly, if I exit the geofence I need to manually switch to the Google Maps app and then back to trigger the exit state change.

Flutter debug console doesn't have any useful information.

frextrite commented 5 years ago

The problem arises because the GPS location never gets updated if only this plugin is used. Switching back and forth to Google Maps, resulted in the current updated location to be stored by the OS which was later accessed by the Geofence plugin and hence resulted in the triggers. The problem is solved if the location is polled continuously or via FusedApi.

wyklif commented 4 years ago

@frextrite how do we poll location continuously

frextrite commented 4 years ago

@wyklif I can't say exactly but try looking into FusedApi and/or similar stuff.