This commit is contained in:
Hamza-Ayed
2024-06-22 13:12:35 +03:00
parent 1cc0156cfd
commit 3c5321f70b
67 changed files with 91 additions and 740 deletions

View File

@@ -29,7 +29,6 @@ class LocationBackgroundController extends GetxController {
BackgroundLocation.startLocationService();
BackgroundLocation.getLocationUpdates((location) {
// Handle location updates here
print("New location: ${location.latitude}, ${location.longitude}");
});
}
@@ -47,21 +46,9 @@ class LocationBackgroundController extends GetxController {
BackgroundLocation.setAndroidConfiguration(
Duration.microsecondsPerSecond); // Set interval to 5 seconds
BackgroundLocation.getLocationUpdates((location1) {
print('''\n
Latitude: ${location1.latitude.toString()}
Longitude: ${location1.longitude.toString()}
Altitude: ${location1.altitude.toString()}
Accuracy: ${location1.accuracy.toString()}
Bearing: ${location1.bearing.toString()}
Speed: ${location1.speed.toString()}
''');
});
BackgroundLocation.getLocationUpdates((location1) {});
} else {
await Permission.locationAlways.request();
print('Location permission not granted');
}
}
}