capacitor-background-geolocation: Slowness when retrieving current position on Android
Your Environment
- Plugin version: ^5.4.0
- Platform: Android
- Device OS version: 13
- Device manufacturer / model: Galaxy A53 5G (Samsung)
- Capacitor info :
Latest Dependencies:
@capacitor/cli: 5.7.4
@capacitor/core: 5.7.4
@capacitor/android: 5.7.4
@capacitor/ios: 5.7.4
Installed Dependencies:
@capacitor/cli: 5.2.2
@capacitor/core: 5.2.2
@capacitor/android: 5.2.2
@capacitor/ios: 5.2.2
- Plugin config provided to
#ready:
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
stopTimeout: 5,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_DEBUG,
stopOnTerminate: true,
startOnBoot: false,
locationAuthorizationRequest: 'WhenInUse'
Expected Behavior
When I call the method await BackgroundGeolocation.getCurrentPosition(), the data should arrives without long delay.
Actual Behavior
With IOS, I get the data directly but with Android, I have a long time corresponding to the timeout (30 seconds).
Steps to Reproduce
- Configure the plugin.
- Request permission if not done.
- At the opening of the application, call the method await BackgroundGeolocation.getCurrentPosition().
Context
I try to get the current location of the user at the opening of the application to propose activities around it.
Debug logs
Logs
[c.t.l.l.TSLocationManager a]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 1 (76125ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused 50.839151,4.354900 hAcc=14.461 et=+20h19m32s798ms alt=204.39999389648438 vAcc=1.0 {Bundle[{battery_level=0.95, is_charging=true, odometer=0.0}]}], time: 1711448464411
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (12 by maintainers)
Try Google maps