Hi All,
I have the following code using Ionic Native Geolocation:
import { Geolocation } from 'ionic-native';
this.platform.ready().then(() => {
alert('loadMap about to getCurrentPosition');
Geolocation.getCurrentPosition(options).then((position) => {
alert('loadMap getCurrentPosition');
let latLng: google.maps.LatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
bound.extend(latLng);
this.load(bound);
});
});
When I run this as ionic serve
in a browser, or I build it and run it on iOS Simulator
(Xcode
), it works. However, when I build this for Android
, and try run it, the first alert gets fired, but not the second.
That means for Android
only, Geolocation.getCurrentPosition...
is not working.
Does anyone know what I am doing incorrectly, or if there are some missing steps in the Android install and build process?
Thanks