2011-08-23 5 views
2

Adobe AIR로 iOS 앱을 개발 중입니다.iOS에서 GPS 리소스를 사용 중입니다. (Geolocation 클래스, Adobe AIR 사용)

iOS 플랫폼에서 Geolocation 클래스를 사용하면 GPS 리소스를 차지하고 다른 앱은 GPS 기능을 사용할 수 없다는 것을 발견했습니다.

누구나 똑같은 것을 발견합니까?

나는 그것이 내 잘못된 코드이거나 Adobe AIR의 버그라고 확신하지 않습니다. 너무 자주 요청을하여 GPS를 독차지하고 있기 때문에

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); 
    } 

답변

0

는 아마 :

다음은 내 코드입니다. 아마도 첫 번째 응답에 대처할 수 없기 때문에 모든 것이 막히게됩니다. setRequestedUpdateInterval을 100 밀리 초가 아닌 3000과 같은 값으로 변경하십시오.