Interface LocationListener


public interface LocationListener
Used for received locations and statuses from the LocationManager. You have to register the listener using the LocationManager.requestLocationUpdates(LocationRequest, LocationListener)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(Error error)
    Called when an error is received during initialization.
    void
    Called when the location has changed
    void
    Called when a new status is received
  • Method Details

    • onLocationChanged

      void onLocationChanged(@NonNull Location location)
      Called when the location has changed
      Parameters:
      location - the updated location
    • onStatusChanged

      void onStatusChanged(@NonNull LocationStatus status)
      Called when a new status is received
      Parameters:
      status - One of the LocationStatus
    • onError

      void onError(@NonNull Error error)
      Called when an error is received during initialization. The positioning will not be started if an error is received.
      Parameters:
      error -