Closed DevTiago closed 3 years ago
Well,
I figure that the problem is not the request to server but the background service that not work.
I've managed the AppLifecycleState on my App and when i pause it i set this code:
void didChangeAppLifecycleState(AppLifecycleState state) async {
switch (state) {
case AppLifecycleState.paused:
await BackgroundLocation.startLocationService();
await BackgroundLocation.setAndroidConfiguration(5000);
BackgroundLocation.getLocationUpdates((location) {
print(DateTime.now());
});
break;
And when i pause the app i get the data/time but it stops after 30 seconds (more or less).
Hey there,
Any chance i can send an http request to a server instead of printing the location on
getLocationUpdates
method?