Team Color, image compression for attendance verification, improved wherebouts
This commit is contained in:
@@ -54,12 +54,14 @@ void callbackDispatcher() {
|
||||
|
||||
/// Initialize Workmanager and register periodic background location task.
|
||||
Future<void> initBackgroundLocationService() async {
|
||||
if (kIsWeb) return; // Workmanager is not supported on web.
|
||||
await Workmanager().initialize(callbackDispatcher);
|
||||
}
|
||||
|
||||
/// Register a periodic task to report location every ~15 minutes
|
||||
/// (Android minimum for periodic Workmanager tasks).
|
||||
Future<void> startBackgroundLocationUpdates() async {
|
||||
if (kIsWeb) return; // Workmanager is not supported on web.
|
||||
await Workmanager().registerPeriodicTask(
|
||||
_taskName,
|
||||
_taskName,
|
||||
@@ -71,5 +73,6 @@ Future<void> startBackgroundLocationUpdates() async {
|
||||
|
||||
/// Cancel the periodic background location task.
|
||||
Future<void> stopBackgroundLocationUpdates() async {
|
||||
if (kIsWeb) return; // Workmanager is not supported on web.
|
||||
await Workmanager().cancelByUniqueName(_taskName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user