onStatusChanged
Added in API level 1
Deprecated in API level 29
public void onStatusChanged (String provider,
int status,
Bundle extras)
This method was deprecated in API level 29.
This callback will never be invoked on Android Q and above.
This callback will never be invoked on Android Q and above, and providers can be considered as always in the LocationProvider#AVAILABLE state.
Note that this method only has a default implementation on Android R and above, and this method must still be overridden in order to run successfully on Android versions below R. LocationListenerCompat from the compat libraries may be used to avoid the need to override for older platforms.
onStatusChanged deprecated The Google Location Services API is officially recommended, but this can only be used if the device has Google Services. Unfortunately, my device does not have Google Services, so is there any other alternative?