Cannot change url
Closed this issue · 1 comments
Your Environment
- Plugin version: ^1.9.0-beta.4
- Platform: iOS
- OS version: 11.4.1
- Device manufacturer / model: Apple / iPhone SE
- Nativescript version (
tns info
):
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 4.1.2 and the latest available version is 4.2.4.
⚠ Update available for component tns-core-modules. Your current version is 4.1.1 and the latest available version is 4.2.1.
✖ Component tns-android is not installed.
⚠ Update available for component tns-ios. Your current version is 4.1.1 and the latest available version is 4.2.0.
-
Plugin config
BackgroundGeolocation.ready({ url: 'http://myvm.test/api/v1/locations', params: { 'location_data': this.location }, reset: true, debug: true, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 1, stopTimeout: 1, autoSync: true, stopOnTerminate: false, startOnBoot: true, foregroundService: true, heartbeatInterval: 60, username: 'transistor-ns', enableHeadless: true }, (state) => { console.log('[ready] success -', state); }, (error:string) => { console.warn('[ready] FAILURE -', error); });
Expected Behavior
The url should change.
Actual Behavior
The url is still pointing to transistorsoft.com url.
....
CONSOLE LOG file:///app/item/items.component.js:98:24: [ready] success - {
"activityType": 1,
"elasticityMultiplier": 1,
"disableStopDetection": false,
"minimumActivityRecognitionConfidence": 70,
"desiredAccuracy": -1,
"autoSync": true,
"stopTimeout": 1,
"useSignificantChangesOnly": false,
"stopDetectionDelay": 0,
"autoSyncThreshold": 0,
"batchSync": false,
"disableElasticity": false,
"locationAuthorizationAlert": {
"settingsButton": "Settings",
"cancelButton": "Cancel",
"titleWhenNotEnabled": "Background location is not enabled",
"instructions": "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings",
"titleWhenOff": "Location services are off"
},
"url": "http://tracker.transistorsoft.com/locations/transistor-ns",
"stopOnStationary": false,
"isFirstBoot": true,
"startOnBoot": true,
"locationAuthorizationRequest": "Always",
"httpTimeout": 60000,
"stopOnTerminate": false,
"lastLocationAuthorizationStatus": 0,
"maxBatchSize": -1,
"maxRecordsToPersist": -1,
"activityRecognitionInterval": 10000,
"isMoving": false,
"trackingMode": 1,
"stationaryRadius": 25,
"preventSuspend": false,
"extras": {},
"disableMotionActivityUpdates": false,
"odometer": 0,
"locationTimeout": 60,
"params": {
"device": {
"uuid": "2CA4X11E-XXXX-XXXX-XXXX-94D6FE46DA7B",
"model": "iPhone",
"platform": "iOS",
"manufacturer": "Apple",
"version": "10.3.1",
"framework": "{N}"
}
},
"method": "POST",
"logMaxDays": 3,
"geofenceInitialTriggerEntry": true,
"disableLocationAuthorizationAlert": false,
"distanceFilter": 1,
"headers": {},
"heartbeatInterval": 60,
"httpRootProperty": "location",
"desiredOdometerAccuracy": 100,
"debug": true,
"locationTemplate": "",
"schedule": [],
"locationsOrderDirection": "ASC",
"stopAfterElapsedMinutes": -1,
"schedulerEnabled": false,
"pausesLocationUpdatesAutomatically": false,
"geofenceProximityRadius": 1000,
"geofenceTemplate": "",
"maxDaysToPersist": 1,
"logLevel": 5,
"enabled": false
}
Steps to Reproduce
- Start App with the ready method.
Context
Testing the library to make sure it can be used for project
Debug logs
See above ... [Actual Behavior]
Remove the username
option.
When the plugin sees that, it overrides the #url