使用MyLocationOverlay獲取我的位置。但是我想停止GPS onPause並重新開始onResume。我怎樣才能做到這一點 ?android MyLocationOverlay停止GPS onPause
我知道的LocationManager是方法removeUpdates ...
final MyLocationOverlay myLocationOverlay = new MyLocationOverlay(this, mapView);
myLocationOverlay.enableMyLocation();
mapView.getOverlays().add(myLocationOverlay);
locButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
myLocationOverlay.runOnFirstFix(new Runnable() {
public void run() {
// TODO Auto-generated method stub
mapView.getController().animateTo(myLocationOverlay.getMyLocation());
}
});{
}
}
});