我對谷歌地圖應用程序的工作,我使用谷歌的融合位置提供尋找currentlocation,我試圖requestlocationupdates但是當我使用GPS和locationrequest優先HIGH_ACCURACY問題我面對,我的電池越來越排水速度非常快這就是爲什麼我想改變我的locationrequest優先BALANCED_POWER但沒有GPS我無法得到緯度和經度,但在谷歌文檔,他們沒有GPS提到的也應該工作,請回復Fusionlocationprovider不無GPS工作在Android的
代碼:
_googleApiClient = new GoogleApiClient.Builder(this)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
_locationRequest = new LocationRequest();
_locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
PendingResult<Status> pendingResult = LocationServices.FusedLocationApi.requestLocationUpdates(
_googleApiClient, _locationRequest,this);
你能設法達到你想要的嗎?我很好奇,如果它確實對你的工作.. – cgr