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
I have a module where I need to track Point A and Point B of delivery, normally the process of delivery is the phone is always awake not in locked mode and this is working fine all the coordinate is saved, if the phone is locked the coordinates is not saving in the Mongodb, I don't understand where the problem is but currently we used Transistorsoft for live tracking and meteorrn/core for saving the information.
Hi support team & co-developer,
I have a module where I need to track Point A and Point B of delivery, normally the process of delivery is the phone is always awake not in locked mode and this is working fine all the coordinate is saved, if the phone is locked the coordinates is not saving in the Mongodb, I don't understand where the problem is but currently we used Transistorsoft for live tracking and meteorrn/core for saving the information.
async componentDidMount() { this.watchPosition() }
watchPosition = () => { BackgroundGeolocation.start() this.subscriptions.push(BackgroundGeolocation.onLocation((location) => { const { latitude, longitude } = location?.coords const params = { _id: this.props.id, timestamp: location?.timestamp, lat: latitude, lng: longitude, truckId: profile?.truckerId, }; this.props.dispatch(Jobs.updateLocation(params)) BackgroundGeolocation.destroyLocation }, (error) => { console.log('[onLocation] ERROR:', error); })) /// 2. ready the plugin. BackgroundGeolocation.ready({ // Geolocation Config desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 10, // Activity Recognition stopTimeout: 5, // Application config debug: 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. batchSync: 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. }).then((state) => { }) };
The text was updated successfully, but these errors were encountered: