Closed ChrisElliotUK closed 6 months ago
It’s invalid to call .changePace when the plug-in is disabled.
you should be catching your exceptions
@christocracy I am catching it, I am just letting you know the exception that is thrown is not formatted correctly. I fully expect the error and I am just testing different scenarios. My understanding is that it should be a Platform Exception but we get FormatException
I’ll look into it.
I found the problem. The fix will arrive in the next version.
Released to 4.15.3
.
Your Environment
flutter doctor
):• No issues found!
final bg.Config _locationConfig = bg.Config( desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH, useSignificantChangesOnly: false, pausesLocationUpdatesAutomatically: false, disableElasticity: true, isMoving: true, showsBackgroundLocationIndicator: true, allowIdenticalLocations: true, activityType: bg.Config.ACTIVITY_TYPE_FITNESS, debug: AppLogs.geolocationDebug, logLevel: AppLogs.geolocationLogLevel, stopOnStationary: false, locationTimeout: 120, stopDetectionDelay: 20, distanceFilter: 10, reset: true, locationAuthorizationRequest: "Always", );
Expected Behavior
Should throw Platform excpetion with background geolocation is disabled.
Actual Behavior
has a format exception
Steps to Reproduce
Context
Trying to test what happens if location permission is set to denied
Debug logs
Logs
``` D/TSLocationManager( 7650): [c.t.l.a.BackgroundGeolocation removeListener] D/TSLocationManager( 7650): ✅ removeListener event: providerchange D/TSLocationManager( 7650): [c.t.l.a.BackgroundGeolocation removeListener] D/TSLocationManager( 7650): ✅ removeListener event: motionchange D/TSLocationManager( 7650): [c.t.l.a.BackgroundGeolocation removeListener] D/TSLocationManager( 7650): ✅ removeListener event: location D/TSLocationManager( 7650): [c.t.l.adapter.TSConfig e] ℹ️ Persist config, dirty: [isMoving] I/flutter ( 7650): FormatException: Invalid radix-10 number (at character 1) I/flutter ( 7650): BackgroundGeolocation is disabled I/flutter ( 7650): ^ ```