Closed raphaaugustosilva closed 4 years ago
It's not clear to me if you only want to stop uploading location to Firebase while letting flutter_background_geolocation
remain tracking.
Yes, I just want to start/stop the Firebase upload but keep the flutter_background_geolocation tracking.
We have 2 "maps screens" at our app, but just in one of then, we need to upload data to Firebase. Currently, the first time I configure the Firebase adapter, it remains running and I'm not able to stop it.
I started to implement this feature then thought of BackgroundGeolocation
's Config.persistMode
Shouldn't this be able to solve your issue?
if (_persistEnabled) {
bg.BackgroundGeolocation.setConfig(bg.Config(
persistMode: bg.Config.PERSIST_MODE_ALL
));
} else {
bg.BackgroundGeolocation.setConfig(bg.Config(
persistMode: bg.Config.PERSIST_MODE_NONE
));
}
Hi Chris,
Yes, this solves our needs :)
Thanks!
Att, Raphael Augusto da Silva
Em qui., 16 de abr. de 2020 às 12:33, Chris Scott notifications@github.com escreveu:
I started to implement this feature then thought of BackgroundGeolocation's Config.persistMode https://pub.dev/documentation/flutter_background_geolocation/latest/flt_background_geolocation/Config/persistMode.html
Shouldn't this be able to solve your issue?
if (_persistEnabled) { bg.BackgroundGeolocation.setConfig(bg.Config( persistMode: bg.Config.PERSIST_MODE_ALL )); } else { bg.BackgroundGeolocation.setConfig(bg.Config( persistMode: bg.Config.PERSIST_MODE_NONE )); }
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation_firebase/issues/11#issuecomment-614726419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3Q5FIV43II6GK6LCLIHWLRM4QLVANCNFSM4KZD7Q4Q .
Is your feature request related to a problem? Please describe. We need to invoke "start" and "stop" on-demand, in order to control whenever we would like to keep the service running or not
How can we do that? I suggest to implement "start" and "stop" methods at the plugin
Describe the solution you'd like I would like to invoke "start" and "stop" after I configure the plugin