I ahve an ionic app with vue js and i have followed everything Geolocation Capacitor Plugin API | Capacitor Documentation
the documents say but i cant get the location on android.
I have this on mounted
mounted(){
async function loc(){
alert('this was reached');
const coordinates = await Geolocation.getCurrentPosition();
const result = await Geolocation.requestPermissions();
if (result.granted) {
alert(coordinates.coords.latitude);
} else {
alert('permission denied');
}
alert(coordinates.coords.latitude);
};
console.log(loc());
},
i am using playServicesLocationVersion = '20.0.0'
but i cant manage to request permission for gps or get current location coordinates.