Skip to main content

Error Handling

FusedLocation SDK errors are delivered through the FusedLocationListener.onError(Exception) callback. Log the exception and inform the user or adjust the app's functionality when location data is unavailable.

The argument of onChanged(LocationData?) may be null. Check for null before using the location data and do not treat it as a valid location.

When location access is blocked, see the Location Access Blocked State section in Declaring Permission for guidance on informing the user. Determine the specific exception type and whether a retry is appropriate based on the exception delivered by the SDK and the execution environment.