im developing an ionic 2 app, i have a problem with geolocation it is not working on real device, when i check on browser its working but sometime even on browser latitude return null. i think this is timing problem, but i dont know to solve it if anyone can help
MyLocation(){
let options = {enableHighAccuracy: true};
this.geolocation.getCurrentPosition(options).then((resp) => {
console.log(resp.coords.altitude);
console.log(resp.coords.longitude);
}).catch((error) => {
alert(JSON.stringify(error));
});
}