transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
651 stars 242 forks source link

Tracking is not stopping even after logout #1297

Closed sohamD07 closed 4 months ago

sohamD07 commented 6 months ago

My login function calls -> await bg.BackgroundGeolocation.start() My logout function calls -> await bg.BackgroundGeolocation.stop()

Expected Behavior

In my app, whenever a user login to the app tracking gets started, and on logout it gets ended. But I have observed that tracking keeps happening in a one scenarios where the user is not doing logout directly instead he might doing Clear Data from app setting.

Cases:

  1. user 1 login at 10:00 am and logout at 2:00 pm -> Tracking ended at 2:00 pm, no tracking logs after 2:00 pm
  2. user 2 logins at 10:00 am then he did clear data from the app setting at 11:00 am. Again he login to the app at 11:02 am and logout at 2:00 pm -> Tracking not ended after 2:00 pm

Is it possible that, previous instance of tracking not get disposed even after clearing the data from the app setting?

Actual Behavior

Tracking to be ended after logout at 2:00 pm for user 2

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```
christocracy commented 6 months ago

The plug-in does not record locations after .stop() is called.

previous instance of tracking not get disposed even after clearing the data from the app setting?

There’s no such thing as “previous instances”. There is only one instance. The plug-in is implemented as a singleton.

I suggest you observe your logs. See wiki “Debugging”.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.