react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Unknown activity type on iOS
Your Environment
- Plugin version: 4.12.1
- Platform: iOS
- OS version: 13-16
- Device manufacturer / model: iPhone 13-16
- React Native version (
react-native -v
):11.13.5 - Plugin config
{
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
showsBackgroundLocationIndicator: false,
distanceFilter: 10,
stationaryRadius: 25,
stopTimeout: 11,
startOnBoot: true,
stopOnTerminate: false,
enableHeadless: true,
}
Expected Behavior
Locations activity should indicate the activity type, i.e. "walking", "in_vehicle", etc.
Actual Behavior
With some devices, with the tracking enabled for real-life trips, nearly all activity types are "unknown". It seems to happen notably when the trip starts with a car motion activity. Depending on the device, this can happen in few cases, or ~50% of cases, or >90% of cases. We never experienced the issue with Android.
Steps to Reproduce
Hard to reproduce, as it happens in real-life trips, on some devices (but always iOS).
Context
Tracking user trips based on location data, thanks to this plugin
Debug logs
Logs
Motion activity info is only available if the user does not deny the “Health & Fitness” permission.
@christocracy Yes, the permission was always accepted on the devices. And I suppose 100% of the activity types would be "unknown" otherwise
Then it's a problem on the device (eg: accelerometer, gyroscope, magnetometer). The iOS Motion API is a black box that offers no configuration. It has only an ON/OFF switch. The data provided by that API is iOS' secret algorithm fusing accelerometer, gyroscope and magnetometer to output still
, in_vehicle
, etc.
All right, I assume you didn't have any other feedback about this iOS issue? At this point we are suspecting that setting a too intensive tracking might hurt the sensors availability
too intensive tracking might hurt the sensors availability
I highly doubt that. The location api does not affect sensors.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.