How to grant app to access Location Services?

I just spun up a new project with the latest ionic version and installed the diagnostic and gelocation plugin.

This is what I’m doing for iOS

import { Component } from ‘@angular/core’;
import {Platform} from ‘ionic-angular’;
import { Diagnostic } from ‘@ionic-native/diagnostic’;
import { Geolocation } from ‘@ionic-native/geolocation’;
import { NavController,AlertController,ToastController } from ‘ionic-angular’;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
public locationSupported:boolean;
public appAuthorized: boolean; constructor(public navCtrl: NavController,
public platform: Platform,
public diagnostic: Diagnostic,
public geolocation: Geolocation,
public toastCtrl: ToastController,
public alertCtrl: AlertController) {
platform.ready().then(() => {
this.diagnostic.isLocationAuthorized().then((authorized) =>
{
if (authorized) { alert(“App has location authorization”);
this.geolocation.getCurrentPosition().then((resp) => {
alert(“Coordinates:” + resp.coords.latitude + " " + resp.coords.longitude);
}).catch((error) => {
alert(‘Error getting location’ + error);
});
}
else {
this.diagnostic.requestLocationAuthorization().then((status)=> {
alert(“Auth Status” + status);
if (status == this.diagnostic.permissionStatus.GRANTED_WHEN_IN_USE) {
alert (“App access” + status);
this.geolocation.getCurrentPosition().then((resp) => {
alert(“Coordinates:” + resp.coords.latitude + " " + resp.coords.longitude);
}).catch((error) => {
alert(‘Error getting location’ + error);
});
}
else {
this.toastCtrl.create(
{ message: “Cannot access location”,
position: “bottom”,
duration: 5000 }).present();
}
})
}
})
})
}}

This gives me an alert message and authorizes location
but geolocation is not my correct lat/lon - these are coordinates in San Francisco
Is this a problem with the emulator?
Also, when I run the same code against android emulator in genymotion
with this.diagnostic.permissionStatus.GRANTED instead of this.diagnostic.permissionStatus.GRANTED_WHEN_IN_USE
I get alert of app status as : DENIED_ALWAYS
How can I get my android emulator to access location settings ?