When i execute requestLocationUpdates like this :
FusedLocationProviderClient fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);
LocationRequest locationRequest = new LocationRequest();
locationRequest.setInterval(150000);
locationRequest.setFastestInterval(30000);
locationRequest.setMaxWaitTime(900000);
locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
locationRequest.setSmallestDisplacement(0);
fusedLocationProviderClient.requestLocationUpdates(locationRequest, getPendingIntent(context));
then the onReceive(Context context, Intent intent)
is immediatly fired without taking care of the setMaxWaitTime(900000)
. Is it a normal/documented behavior ?
In LocationUpdatesPendingIntent there is a small disclaimer: