Device manufacturer / model: iPhone X and Samsung S9, Samsung A30
React Native version (react-native -v): 0.75.4
Plugin config
`BackgroundGeolocation.ready(
{
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
activityType: BackgroundGeolocation.ACTIVITY_TYPE_OTHER_NAVIGATION,
// distanceFilter: isIOS ? 100 : 0,
distanceFilter: 5,
stopTimeout: 5,
stationaryRadius: 0,
preventSuspend: true,
stopOnTerminate: false, // Continue tracking after app termination
startOnBoot: true, // Start tracking when the device boots up
foregroundService: true, // Optional: run as a foreground service
debug: false, // Set true for debugging (shows notifications)
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, // Log level for debugging notificationTitle: 'Tracking Location',
enableHeadless: true,
notification: {
title: 'Location Tracking',
text: 'Tracking your location...',
channelName: 'Location Tracking',
priority: BackgroundGeolocation.NOTIFICATION_PRIORITY_HIGH,
},
},
async state => {
console.log('STATE #####: ', state);
const storedLoadId = await AsyncStorage.getData('loadId');
if (state.didLaunchInBackground && state.enabled && isIOS) {
setIsTracking(state.enabled);
loadId = storedLoadId;
setLoadBeingTracked(storedLoadId);
} else {
setIsTracking(state.enabled);
setLoadBeingTracked(storedLoadId);
}
},
);`
Expected Behavior
After location update onLocation event should work
Actual Behavior
After location updates onLocation event is not triggered
Steps to Reproduce
1.
2.
3.
4.
Context
I'm trying to send a API call (code is in onLocation event) after every location update
P.S I haven't bought the license key yet I'm still testing and I'm not satisfied yet.
Your Environment
react-native -v
): 0.75.4Expected Behavior
After location update onLocation event should work
Actual Behavior
After location updates onLocation event is not triggered
Steps to Reproduce
1. 2. 3. 4.
Context
I'm trying to send a API call (code is in onLocation event) after every location update P.S I haven't bought the license key yet I'm still testing and I'm not satisfied yet.
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```