我真的必须找到一种方法来使用或找到替代交叉线的东西,即FusedLocationApi
我希望你能给我一个答案
public void onConnected(@Nullable Bundle bundle) {
locationRequest = new LocationRequest;
locationRequest.setInterval(1000);
locationRequest.setFastestInterval(1000);
locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION==PackageManager.PERMISSION_GRANTED){
LocationServices.FusedLocationApi.requestLocationUpdates(client,locationRequest,this);
}
}