-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Your Environment
- Plugin version: 1.1.0
- Platform: Android
- OS version: Android 14
- Device manufacturer / model: Google Pixel 4a
- Flutter info (
flutter info,flutter doctor):
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.3, on macOS 26.3 25D125 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] VS Code (version 1.109.5)
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
- Plugin config
BackgroundGeolocationFirebase.configure(
BackgroundGeolocationFirebaseConfig(
locationsCollection: '/user/$userId/location/latest',
updateSingleDocument: true,
),
);
bg.BackgroundGeolocation.ready(bg.Config(
extras: extras,
debug: false,
// Permissions
locationAuthorizationRequest: 'Always',
backgroundPermissionRationale: bg.PermissionRationale(
title:
"Allow {applicationName} to access to this device's location in the background?",
message:
"{applicationName} collects location data to enable the Trip Monitoring to work even when the app is closed or not in use.",
positiveAction: "Change to {backgroundPermissionOptionLabel}",
negativeAction: "Cancel",
),
// Notification indicator
notification: bg.Notification(
sticky: true,
title: "UK Power",
largeIcon: "drawable/app_icon",
smallIcon: "drawable/app_icon",
),
// Logs related
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
logMaxDays: 5,
// System Related
reset: true,
stopTimeout: 5,
stopOnTerminate: false,
startOnBoot: true,
enableHeadless: true,
preventSuspend: true,
showsBackgroundLocationIndicator: true,
// Heart beat
maxDaysToPersist: 5,
heartbeatInterval: 60 * 30,
// Storage
persistMode: bg.Config.PERSIST_MODE_ALL,
// Location
locationsOrderDirection: "DESC",
desiredAccuracy: deviceInfo.platform == "iOS"
? bg.Config.DESIRED_ACCURACY_NAVIGATION
: bg.Config.DESIRED_ACCURACY_HIGH,
distanceFilter: 25.0,
motionTriggerDelay: 2000,
activityRecognitionInterval: 0,
minimumActivityRecognitionConfidence: 50,
));
BackgroundFetch.configure(
BackgroundFetchConfig(
enableHeadless: true,
minimumFetchInterval: 15,
stopOnTerminate: false,
startOnBoot: true,
forceAlarmManager: true,
requiresBatteryNotLow: false,
requiresCharging: false,
requiresStorageNotLow: false,
requiresDeviceIdle: false,
), (String taskId) async {}
);
To Reproduce
Steps to reproduce the behavior:
- Configure plugin as per documentation
- Run application
- App crashes
Debug logs
E/kpower.app.test(18245): No implementation found for java.lang.String com.transistorsoft.locationmanager.plugin.TSPlugin.i() (tried Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i and Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i__) - is the library loaded, e.g. System.loadLibrary?
E/TSLocationManager(18245): [c.t.l.a.BackgroundGeolocation$e0 uncaughtException]
E/TSLocationManager(18245): ‼️ Uncaught Exception: No implementation found for java.lang.String com.transistorsoft.locationmanager.plugin.TSPlugin.i() (tried Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i and Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i__) - is the library loaded, e.g. System.loadLibrary?
E/TSLocationManager(18245): {"activity":{"activityRecognitionInterval":500,"disableMotionActivityUpdates":false,"disableStopDetection":false,"minimumActivityRecognitionConfidence":50,"motionTriggerDelay":2000,"stopOnStationary":false,"triggerActivities":"in_vehicle, on_bicycle, on_foot, running, walking"},"app":{"backgroundPermissionRationale":{"positiveAction":"Change to {backgroundPermissionOptionLabel}","title":"Allow {applicationName} to access to this device's location in the background?","message":"{applicationName} collects location data to enable the Trip Monitoring to work even when the app is closed or not in use.","negativeAction":"Cancel"},"enableHeadless":true,"foregroundService":true,"headlessJobService":"com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask","heartbeatInterval":1800,"mainActivityName":null,"notification":{"actions":[],"allowTap":true,"channelDescription":"Location tracking","channelId":"bggeo","channelName":"BackgroundGeolocation","color":"","importance":2,"largeIcon":"drawable\/app_icon","layout":"","priority":-1,"smallIcon":"drawable\/app_icon","sticky":true,"strings":{},"tapActivity":"","text":"Tracking location","title":"UK Power"},"schedule":[],"scheduleUseAlarmManager":false,"serviceLaunchDelay":1000,"startOnBoot":true,"stopOnTerminate":false},"authorization":{"accessToken":"✱✱✱","expires":-1,"refreshHeaders":{},"refreshPayload":{},"refreshToken":"✱✱✱","refreshUrl":"✱✱✱","strategy":"JWT"},"geolocation":{"allowIdenticalLocations":false,"deferTime":0,"desiredAccuracy":-1,"disableElasticity":false,"disableLocationAuthorizationAlert":false,"distanceFilter":25,"elasticityMultiplier":1,"enableTimestampMeta":false,"fastestLocationUpdateInterval":-1,"filter":{"burstWindow":10,"filterDebug":false,"kalmanDebug":false,"kalmanProfile":0,"maxBurstDistance":300,"maxImpliedSpeed":60,"odometerAccuracyThreshold":20,"odometerUseKalmanFilter":true,"policy":2,"rollingWindow":5,"trackingAccuracyThreshold":100,"useKalman":true},"geofenceInitialTriggerEntry":true,"geofenceModeHighAccuracy":true,"geofenceProximityRadius":1000,"locationAuthorizationRequest":"Always","locationTimeout":60,"locationUpdateInterval":1000,"stationaryRadius":150,"stopAfterElapsedMinutes":0,"stopTimeout":5,"useCLLocationAccuracy":false,"useSignificantChangesOnly":false},"http":{"autoSync":true,"autoSyncThreshold":0,"batchSync":false,"disableAutoSyncOnCellular":false,"headers":{},"maxBatchSize":-1,"method":"POST","params":{},"rootProperty":"location","timeout":60000,"url":""},"logger":{"debug":false,"logLevel":5,"logMaxDays":5},"persistence":{"disableProviderChangeRecord":false,"extras":{"os":"android","app_version":"1.1.1","os_version":"34"},"geofenceTemplate":"","locationTemplate":"","locationsOrderDirection":"DESC","maxDaysToPersist":5,"maxRecordsToPersist":-1,"persistMode":2},"activityRecognitionInterval":500,"disableMotionActivityUpdates":false,"disableStopDetection":false,"minimumActivityRecognitionConfidence":50,"motionTriggerDelay":2000,"stopOnStationary":false,"triggerActivities":"in_vehicle, on_bicycle, on_foot, running, walking","backgroundPermissionRationale":{"positiveAction":"Change to {backgroundPermissionOptionLabel}","title":"Allow {applicationName} to access to this device's location in the background?","message":"{applicationName} collects location data to enable the Trip Monitoring to work even when the app is closed or not in use.","negativeAction":"Cancel"},"enableHeadless":true,"foregroundService":true,"headlessJobService":"com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask","heartbeatInterval":1800,"actions":[],"allowTap":true,"channelDescription":"Location tracking","channelId":"bggeo","channelName":"BackgroundGeolocation","color":"","importance":2,"largeIcon":"drawable\/app_icon","layout":"","priority":-1,"smallIcon":"drawable\/app_icon","sticky":true,"strings":{},"tapActivity":"","text":"Tracking location","title":"UK Power","notification":{"actions":[],"allowTap":true,"channelDescription":"Location tracking","channelId
E/TSLocationManager(18245): java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String com.transistorsoft.locationmanager.plugin.TSPlugin.i() (tried Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i and Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i__) - is the library loaded, e.g. System.loadLibrary?
E/TSLocationManager(18245): at com.transistorsoft.locationmanager.plugin.TSPlugin.i(Native Method)
E/TSLocationManager(18245): at com.transistorsoft.locationmanager.plugin.TSPlugin.<clinit>(r8-map-id-790b64259fb0934ba91077229d71609bb1a84d45f3c741a7714bb010b1bb7004:13)
E/TSLocationManager(18245): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.registerPlugin(r8-map-id-790b64259fb0934ba91077229d71609bb1a84d45f3c741a7714bb010b1bb7004:1)
E/TSLocationManager(18245): at com.transistorsoft.tsfirebaseproxy.TSFirebaseProxy.register(TSFirebaseProxy.java:97)
E/TSLocationManager(18245): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationFirebaseModule.configure(BackgroundGeolocationFirebaseModule.java:93)
E/TSLocationManager(18245): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationFirebaseModule.onMethodCall(BackgroundGeolocationFirebaseModule.java:72)
E/TSLocationManager(18245): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/TSLocationManager(18245): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/TSLocationManager(18245): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/TSLocationManager(18245): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/TSLocationManager(18245): at android.os.Handler.handleCallback(Handler.java:958)
E/TSLocationManager(18245): at android.os.Handler.dispatchMessage(Handler.java:99)
E/TSLocationManager(18245): at android.os.Looper.loopOnce(Looper.java:205)
E/TSLocationManager(18245): at android.os.Looper.loop(Looper.java:294)
E/TSLocationManager(18245): at android.app.ActivityThread.main(ActivityThread.java:8177)
E/TSLocationManager(18245): at java.lang.reflect.Method.invoke(Native Method)
E/TSLocationManager(18245): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/TSLocationManager(18245): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
D/FirebaseSessions(18245): App backgrounded on uk.co.tracker.ukpower.app.test
E/AndroidRuntime(18245): FATAL EXCEPTION: main
E/AndroidRuntime(18245): Process: uk.co.tracker.ukpower.app.test, PID: 18245
E/AndroidRuntime(18245): java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String com.transistorsoft.locationmanager.plugin.TSPlugin.i() (tried Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i and Java_com_transistorsoft_locationmanager_plugin_TSPlugin_i__) - is the library loaded, e.g. System.loadLibrary?
E/AndroidRuntime(18245): at com.transistorsoft.locationmanager.plugin.TSPlugin.i(Native Method)
E/AndroidRuntime(18245): at com.transistorsoft.locationmanager.plugin.TSPlugin.<clinit>(r8-map-id-790b64259fb0934ba91077229d71609bb1a84d45f3c741a7714bb010b1bb7004:13)
E/AndroidRuntime(18245): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.registerPlugin(r8-map-id-790b64259fb0934ba91077229d71609bb1a84d45f3c741a7714bb010b1bb7004:1)
E/AndroidRuntime(18245): at com.transistorsoft.tsfirebaseproxy.TSFirebaseProxy.register(TSFirebaseProxy.java:97)
E/AndroidRuntime(18245): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationFirebaseModule.configure(BackgroundGeolocationFirebaseModule.java:93)
E/AndroidRuntime(18245): at com.transistorsoft.flutter.backgroundgeolocation.BackgroundGeolocationFirebaseModule.onMethodCall(BackgroundGeolocationFirebaseModule.java:72)
E/AndroidRuntime(18245): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/AndroidRuntime(18245): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/AndroidRuntime(18245): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/AndroidRuntime(18245): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/AndroidRuntime(18245): at android.os.Handler.handleCallback(Handler.java:958)
E/AndroidRuntime(18245): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18245): at android.os.Looper.loopOnce(Looper.java:205)
E/AndroidRuntime(18245): at android.os.Looper.loop(Looper.java:294)
E/AndroidRuntime(18245): at android.app.ActivityThread.main(ActivityThread.java:8177)
E/AndroidRuntime(18245): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18245): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime(18245): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Additional context
I'm trying to upgrade the flutter_background_geolocation library to 5.0.5 and also flutter to 3.29.3 but I'm encountering the error. Some things to note:
- I've cloned the flutter_background_geolocation_firebase repo and removed all the v2 references to get it to build.
- We are already using an updated flutter_background_geolocation license, we've moved to v5 now.
- I've tried removing the references to the flutter_background_geolocation_firebase in code and everything works ok minus the saving to firebase.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels