rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
288 stars 328 forks source link

Service state is inconsistent #232

Open dacianf opened 3 years ago

dacianf commented 3 years ago

Hey, @mehdok!

I've seen that in the last version you've added Save state of service in preferences. This leads us to an inconsistent state when the service crashes. eg:

Why did you decide to keep the state of the service in SP?

mehdok commented 3 years ago

Hi @dacianf

When the app is getting removed from the recent list (both Android and iOS) every variable in the app is getting destroyed, so we need some other way to tell whether the service is running or not. The ideal situation would be a method to tell the service status without storing anything, but I couldn't find anything at that moment.

That's why I published this version as beta