Hi,
I have an issue when using native IONIC Background Geo Location implementation. Using the Dragan template for asking my question:
What platform are you using? iOS or Android?
Android 6
What OS environment? Windows, Linux, MacOS?
Windows
Have you received an error or is it just not working?
I’m using Background GeoLocation NATIVE Wrapper plugin. When a new location update is received the returned BackgroundGeolocationResponse object does not contain a locationId property. Everything else works fine.
The relevant code snippet looks like:
this.backGeo.configure(this.config).subscribe((position: BackgroundGeolocationResponse) => {
console.log("New position recevied: " + position);
// Then I'm doing some stuff and afterwards I try to delete the location Entry from internal DB
// But whatever I'm doing here, position.locationId is null, even so all other
// properties of the object are properly filled...
this.backGeo.deleteLocation(position.locationId);
Cordova version if you have already wrapped your app?
Here my package.json
{
"name": "MyTrack2",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"engines": {
"node": "6.9.2"
},
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.0.0",
"@ionic-native/background-geolocation": "^3.4.4",
"@ionic-native/core": "4.0.1",
"@ionic-native/diagnostic": "4.0.1",
"@ionic-native/geolocation": "4.0.1",
"@ionic-native/google-maps": "4.0.1",
"@ionic-native/network": "4.0.1",
"@ionic/storage": "2.0.1",
"angularfire2": "^2.0.0-beta.8",
"firebase": "^3.7.2",
"ionic-angular": "3.5.3",
"ionic-native": "^2.8.1",
"ionicons": "3.0.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "2.0.2",
"@ionic/cli-plugin-cordova": "1.5.0",
"@ionic/cli-plugin-ionic-angular": "1.4.0",
"ionic": "3.6.0",
"typescript": "2.3.3"
},
"version": "0.0.1",
"description": "An Ionic project"
}
Thanks for your help.
Thomas