我正在申请GPS跟踪。我创建了LocationManager并设置了requestLocationUpdates。
LocationManager myManager = (LocationManager) mMap.getSystemService("location");
myManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,MIN_TIME, MIN_DISTANCE, this);
如何为电池选择最佳参数MIN_TIME和MIN_DISTANCE并记录正常音轨?请给我答案的理由。
提前致谢!
UPD:我需要最佳参数。我知道如何检测位置!
答案 0 :(得分:0)
locationManager =(LocationManager)getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,locationListner); location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);