Im using MyLocationOverlay to get my location. But i would like to stop GPS onPause and resume it onResume. How can i do that ?
I know for LocationManager is method 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());
}
});{
}
}
});