2011-09-10 3 views
0

빠른 동작 문제가 있습니다. 다음 코드 줄을 호출 할 때 :GPS가 의도 호출을 사용하여 계속 남아 있습니다.

String currURL = "http://maps.google.com/maps?saddr="+nLocation.getLatitude()+","+nLocation.getLongitude()+"&daddr=110+Possum+Hollow+Road,+Newark,+DE+19711+(Tri-State+Bird+Rescue)&hl=en&ll=AnotherLat,AnotherLong&spn=0.28323,0.683212&sll=AnotherLat,AnotherLong&sspn=0.283147,0.683212&geocode=FcejYQIdRnCE-w%3BFXn_XQIda4F8-yF_tbhhHBmAIw&vpsrc=0&mra=pd&z=11"; 
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(currURL)); 
App.this.getParent().startActivity(browserIntent); 

GPS를 켜 놓은 것처럼 보입니다. 내가하는 일에 뭔가 이상이 있나?

감사합니다. 당신이 위치 업데이트를 요청하는 경우가 MyLocationOverlay에 내장 된지도보기를 사용하는 경우 존

답변

1

, 당신은 removeUpdates(locationListener) 그래서, 바로 startActivity을하기 전에, 당신이 removeUpdates

+0

감사합니다. 나는 그 일을 잊어 버렸습니다. – Jon

+0

당신은 천만에요. :) – Jakar

1

로 할 수 있습니다 수행해야합니다, 당신은 명시 적으로 청소해야합니다 MapView가 닫힐 때 MyLocationOverlay.disableMyLocation()을 사용하여이 리소스를 설정/해제하십시오. 이러한 개별 오버레이가 스스로 위치를 요청하기 때문에 상태 표시 줄에 GPS 아이콘이 깜박이며 GPS 장치가 켜져있을 수 있습니다.

출처 : https://groups.google.com/d/msg/android-developers/SmiBz--6COc/blu9Bhkrt1QJ

관련 문제