You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Native version (react-native -v): "^0.74.5",
Plugin config
React.useEffect(()=>{/// 1. Subscribe to events.constonLocation: Subscription=BackgroundGeolocation.onLocation((location)=>{// console.log('[onLocation]', location);setLocationData({lat: location?.coords?.latitude,long: location?.coords?.longitude,});setIs_moving(location?.is_moving);});constonMotionChange: Subscription=BackgroundGeolocation.onMotionChange((event)=>{// console.log('[onMotionChange]', event);});constonActivityChange: Subscription=BackgroundGeolocation.onActivityChange((event)=>{// console.log('[onActivityChange]', event);});constonProviderChange: Subscription=BackgroundGeolocation.onProviderChange((event)=>{// console.log('[onProviderChange]', event);});constonHttp=BackgroundGeolocation.onHttp((httpEvent)=>{//console.log('[http] ', httpEvent);});constonAuthorization=BackgroundGeolocation.onAuthorization((httpEvent)=>{// console.log('[onAuthorization] ', httpEvent);});/// 2. ready the plugin.BackgroundGeolocation.ready({locationAuthorizationRequest: 'Always',disableLocationAuthorizationAlert: false,backgroundPermissionRationale: {title:
"Allow Cheezious to access this device's location in the background?",message:
'In order to track your activity in the background, please enable your backgoround location permission',positiveAction: 'Allow',negativeAction: 'Cancel',},notification: {title: 'Background Location Tracking',text: 'We are tracking your location to provide real-time updates.',},// Geolocation ConfigdesiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,distanceFilter: 100,// Activity RecognitionstopTimeout: 5,// Application configdebug: false,// <-- enable this hear sounds for background-geolocation life-cycle.logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,stopOnTerminate: false,// <-- Allow the background-service to continue tracking when user closes the app.startOnBoot: true,// <-- Auto start tracking when device is powered-up.// HTTP / SQLite configbatchSync: false,// <-- [Default: false] Set true to sync locations to server in a single HTTP request.autoSync: true,// <-- [Default: true] Set true to sync each location to server as it arrives.enableHeadless: true,url: `${Config.API_URL}riders/update/location`,method: 'POST',headers: {authorization: 'Bearer '+token??'',},}).then((state)=>{console.log('- BackgroundGeolocation is configured and ready: ',state.enabled);if(!state.enabled){BackgroundGeolocation.start();}}).catch((error)=>{console.log('- BackgroundGeolocation error: ',error);if(error==='Permission denied'){setShowLocationModal(true);}});return()=>{// Remove BackgroundGeolocation event-subscribers when the View is removed or refreshed// during development live-reload. Without this, event-listeners will accumulate with// each refresh during live-reload.onLocation.remove();onMotionChange.remove();onActivityChange.remove();onProviderChange.remove();onHttp.remove();onAuthorization.remove();};},[]);
Expected Behavior
It should not crash in production
Actual Behavior
It should not crash in production
Steps to Reproduce
its happening in production, i am sending screenshots
1.
2.
3.
4.
Context
Debug logs
Logs
PASTE_YOUR_LOGS_HERE
The text was updated successfully, but these errors were encountered:
Your Environment
react-native -v
): "^0.74.5",Expected Behavior
It should not crash in production
Actual Behavior
It should not crash in production
Steps to Reproduce
its happening in production, i am sending screenshots
1.
2.
3.
4.
Context
Debug logs
Logs
The text was updated successfully, but these errors were encountered: