Reputation: 769
I have problem with plugin
import { Geolocation } from '@ionic-native/geolocation';
The geolocation does not work ionic 3 - ANDROID but in web browser from my computer its normal for me, this is my code:
export class TestPage {
state: string = "";
constructor(private geolocation: Geolocation,
public platform: Platform) {
this.platform.ready().then(() => {
this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
this.state+="-"+resp.coords.latitude;
}).catch((error) => {
this.state+="-"+error.message;
});
});
}
}
The result it´s above, I need your help, whats is the wrong??
Upvotes: 1
Views: 536