0

I really have to find a way to use or find something to replace the crossed line which is FusedLocationApi

I wish you could give me an answer

 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);
}
}
  • Possible duplicate of [Android LocationServices.FusedLocationApi deprecated](https://stackoverflow.com/questions/46481789/android-locationservices-fusedlocationapi-deprecated) – Rasoul Miri Sep 22 '18 at 11:31

1 Answers1

0

use getFusedLocationProviderClient instead LocationServices.FusedLocationApi. check this post

Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78