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
BackgroundGeolocation.ready({// Geolocation ConfigdesiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,stopOnTerminate: false,// Allow the background-service to continue tracking when user closes the app.enableHeadless: true,// Allow android tracking when app is terminated stopOnTerminate must be falsestartOnBoot: true,// Auto start tracking when device is powered-up.preventSuspend: true,elasticityMultiplier: 10,distanceFilter: 200,stopTimeout: 15,// change state to stationary after 15 minutes of no movementheartbeatInterval: 1*60,// Every 1 minutes trigger iOS to wake up and get locationurl: `${DRIVER_API_BASE_URL}locations/location`,httpRootProperty: '.',// specify data as root of jsonlocationTemplate: '{"latitude":<%= latitude %>,"longitude":<%= longitude %>}',extras: {accuracyInFeet: 5280,osVersion: env.appVersion||null,fromNotification: false,},notification: {title: 'Driver Mobile',text: 'Currently tracking Shipment progress.',},}).then(()=>{console.log('- BackgroundGeolocation is configured and ready');});
Expected Behavior
When setting the locationTemplate config, it should create the JSON request with the specified names and inserted variables.
Actual Behavior
The resulting JSON request to the API has the default named JSON property names.
Context
I am trying to send a JSON body to my API that looks like
Your Environment
react-native -v
): 74Expected Behavior
When setting the locationTemplate config, it should create the JSON request with the specified names and inserted variables.
Actual Behavior
The resulting JSON request to the API has the default named JSON property names.
Context
I am trying to send a JSON body to my API that looks like
But instead, with the given config, it ends up looking like
Debug logs
Logs
The text was updated successfully, but these errors were encountered: