Open sevenbitbyte opened 1 year ago
This twitter post is similar and adds more context.
https://twitter.com/NZSmartie/status/1582556572454383616
Problem is we're currently using ACTIVITY_PROVIDER
, which greatly improved gps quality.
https://github.com/datapartyjs/rfparty-mobile/blob/main/src/main-window.js#L574
We need to detect when activity recognition service is unavailable/crashing and downgrade to the raw GPS provider.
Found a simple repro:
Merged a fix(#40) and releasing to google play.
Hmm, looks like we're stuck on a very old version of cordova-background-geolocation-plugin
https://github.com/datapartyjs/rfparty-mobile/blob/main/package.json#L29
"cordova-background-geolocation-plugin": "^2.0.7",
Meanwhile geolocation is on v3.1.0
https://github.com/mauron85/cordova-plugin-background-geolocation/blob/master/package.json#L3
Can't remember if there was some good reason to be on an older version. Testing upgrading now.
Oh, the package name changed to @mauron85/cordova-plugin-background-geolocation
Hmm even v3.1.0 appears to still use a deprecated approach to activity provider
Deprecation notice ActivityRecognitionApi
-> https://developers.google.com/android/reference/com/google/android/gms/location/ActivityRecognitionApi
Need to port to ActivityRecognitionClient
-> https://developers.google.com/android/reference/com/google/android/gms/location/ActivityRecognitionClient
For some reason we're seeing elevated rates of the activity service crashing
Impact
So far I've gotten one direct user report and the console appears to showed 2 total that users may have hit this crash.
Next moves
activity
strategy.