Just use same code from Ionic Native Docs
import { Geolocation } from '@ionic-native/geolocation';
...
constructor(private geolocation: Geolocation) {}
...
this.geolocation.getCurrentPosition().then((resp) => {
console.log(resp.coords.latitude);
console.log(resp.coords.longitude);
}).catch((error) => {
console.log('Error getting location', error);
});
All Test on REAL Android Devices
Some devices work, but other not.
Is it the Plugin Problem ?
Anyone has same Issue ?
Any Solution ?
Thx