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 an Ionic-Angular App that uses Capacitor integration and in this App I need to use the Geolocation functionality.
Currently i have installed the Capacitor Geolocation Plugin, I followed the official documentation https://capacitorjs.com/docs/apis/geolocation and everything works fine, the plugin is installed, the app runs fine, etc.
The problem appears when i call the getCurrentPosition(…) or watchPosition(…) methods. Both of them always returns the same Location, even if i move from position.
It is worth mentioning that I am using a real Android device.
In this image you can see that i call the getCurrentPosition(…) method twice (at different moments and different locations) and got the same result.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for your time!
I have an Ionic-Angular App that uses Capacitor integration and in this App I need to use the Geolocation functionality.
Currently i have installed the Capacitor Geolocation Plugin, I followed the official documentation
https://capacitorjs.com/docs/apis/geolocation
and everything works fine, the plugin is installed, the app runs fine, etc.The problem appears when i call the
getCurrentPosition(…)
orwatchPosition(…)
methods. Both of them always returns the same Location, even if i move from position.It is worth mentioning that I am using a real Android device.
In this image you can see that i call the
getCurrentPosition(…)
method twice (at different moments and different locations) and got the same result.Can you help me to solve this problem?
My package.json file:
{ ... "dependencies": { "@angular/common": "~8.2.14", "@angular/core": "~8.2.14", "@angular/forms": "~8.2.14", "@angular/platform-browser": "~8.2.14", "@angular/platform-browser-dynamic": "~8.2.14", "@angular/router": "~8.2.14", "@capacitor/android": "^2.4.2", "@capacitor/core": "^2.4.2", "@ionic-native/battery-status": "^5.24.0", "@ionic-native/call-number": "^5.23.0", "@ionic-native/camera": "^5.25.0", "@ionic-native/core": "^5.0.0", "@ionic-native/geolocation": "^5.24.0", "@ionic-native/launch-navigator": "^5.23.0", "@ionic-native/network": "^5.24.0", "@ionic-native/splash-screen": "^5.28.0", "@ionic-native/sqlite": "^5.22.0", "@ionic-native/status-bar": "^5.28.0", "@ionic/angular": "^5.0.0", "@ionic/pwa-elements": "^1.5.1", "@types/socket.io-client": "^1.4.32", "call-number": "^1.0.1", "cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-battery-status": "^2.0.3", "cordova-plugin-camera": "^4.1.0", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-network-information": "^2.0.2", "cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-statusbar": "^2.4.3", "cordova-sqlite-storage": "^5.0.0", "core-js": "^2.5.4", "devextreme": "19.2.7", "devextreme-angular": "19.2.7", "rxjs": "~6.5.1", "socket.io-client": "^2.3.0", "tslib": "^1.9.0", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4", "zebra-capacitor": "0.0.16", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.803.20", "@angular/cli": "~8.3.23", "@angular/compiler": "~8.2.14", "@angular/compiler-cli": "~8.2.14", "@angular/language-service": "~8.2.14", "@capacitor/cli": "^2.4.2", "@ionic/angular-toolkit": "^2.1.1", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "^8.9.5", "codelyzer": "^5.0.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "jetifier": "^1.6.6", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.4.3" }, ... }
Beta Was this translation helpful? Give feedback.
All reactions