一旦设备开始移动,我想开始 gps 更新:
locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
一旦设备停止,我想停止 gps 更新。
locationManager.removeUpdates(locationListener);
我该怎么做?什么最好的方法?