I am working on GEO LOCATION, i need to find out the Latitude and Longitude or Country and State Names. I am using Flash CS6, AS3 and AIR 24.0.0.180 version. It will return Geolocation.isSupported
is true but when i am adding
geo.setRequestedUpdateInterval(1000);
geo.addEventListener(GeolocationEvent.UPDATE, geolocationUpdateHandler);
The GeolocationEvent.UPDATE
is not fired on Android version 6 and more, for version 5 it is working fine.
//In constructor
if (Geolocation.isSupported)
{
geo = new Geolocation();
geo.addEventListener(PermissionEvent.PERMISSION_STATUS, onPerm);
//even adding update and status listeners here also it will not fired.
}
else
{
log.text = "\n Geolocation not supported";
}
stage.addEventListener(MouseEvent.CLICK, onClick);
private function onClick(e:MouseEvent):void
{
geo.requestPermission(); //here it is asking for permission.
}
private function onPerm(e:PermissionEvent):void
{
//Permission event shows GRANTED when i click on allow.
log.appendText("\n PermissionEvent : " + e.status.toUpperCase() + " !geo.muted :"+!geo.muted+"\n");
if (!geo.muted) //true
{
geo.addEventListener(GeolocationEvent.UPDATE, geoUpdateHandler); //these events are not fired.
}
geo.addEventListener(StatusEvent.STATUS, geoStatusHandler);//these events are not fired.
}