2
我正在通過Adobe AIR開發iOS應用程序。iOS上的佔用GPS資源(使用地理定位類,Adobe AIR)
我發現如果在iOS平臺使用Geolocation類,它會佔用GPS資源,其他應用程序無法使用GPS功能。
有沒有人找到相同的東西?
我不確定這是我的錯誤代碼還是Adobe AIR的錯誤。
以下是我的代碼:
private var geolocation:Geolocation;
private function geolocationGet():void{
geolocation = new Geolocation();
geolocation.setRequestedUpdateInterval(100);
geolocation.addEventListener(GeolocationEvent.UPDATE, geoUpdateHandler);
}
private function geoUpdateHandler(e:GeolocationEvent):void{
geolocation.removeEventListener(GeolocationEvent.UPDATE, geoUpdateHandler);
trace("latitude: "+e.latitude+", longitude: "+e.longitude);
}