Enum Class GeoUniq.RequestResult

java.lang.Object
java.lang.Enum<GeoUniq.RequestResult>
com.geouniq.android.GeoUniq.RequestResult
All Implemented Interfaces:
Serializable, Comparable<GeoUniq.RequestResult>, Constable
Enclosing class:
GeoUniq

public static enum GeoUniq.RequestResult extends Enum<GeoUniq.RequestResult>
Defines possible errors that may occur when some specific methods of GeoUniq SDK are called. Members of this enumeration are provided when the GeoUniq.IErrorListener.onError(GeoUniq.RequestResult) callback is called.
  • Enum Constant Details

    • SUCCESS

      public static final GeoUniq.RequestResult SUCCESS
      The request was successful.
    • GEOLOCATION_UNAVAILABLE

      public static final GeoUniq.RequestResult GEOLOCATION_UNAVAILABLE
      Refers to a location request performed by calling GeoUniq.getLocation(float, ILocationListener, IErrorListener) or to the tracking functionality.

      Means that it is not possible to detect the location of the device or to perform background tracking because geolocation is disabled.

      This error can be solved by asking the User to enable geolocation.

    • LOCATION_NOT_DETECTED

      public static final GeoUniq.RequestResult LOCATION_NOT_DETECTED
      Refers to a location request performed by calling GeoUniq.getLocation(float, ILocationListener, IErrorListener).

      Means that it was not possible to detect the location of the device even if geolocation is available. This might happen when GPS geolocation system cannot detect the location due to bad or no signal, and/or when the location cannot be retrieved from the network due to no Internet connection.

      This error has no resolution.

    • PLAY_SERVICES_RECOVERABLE_ERROR

      public static final GeoUniq.RequestResult PLAY_SERVICES_RECOVERABLE_ERROR
      Refers to a request that needs Google Play Services to be performed.

      Means that a problem occurred but the problem has resolution, for instance by asking the User to enable Play Services or to download a new version.

    • PLAY_SERVICES_UNRECOVERABLE_ERROR

      public static final GeoUniq.RequestResult PLAY_SERVICES_UNRECOVERABLE_ERROR
      Refers to a request that needs Google Play Services to be performed.

      Means that a problem with no resolution occurred.

    • GEOLOCATION_PERMISSION_NOT_GRANTED

      public static final GeoUniq.RequestResult GEOLOCATION_PERMISSION_NOT_GRANTED
      Refers to a location request performed by calling GeoUniq.getLocation(float, ILocationListener, IErrorListener) or to the tracking functionality.

      It means that it is not possible to detect the location of the device or to perform background tracking because location permission is not granted (Android API 23 and later).

      This error can be solved by asking the User to grant the location permission.

    • BACKGROUND_GEOLOCATION_PERMISSION_NOT_GRANTED

      public static final GeoUniq.RequestResult BACKGROUND_GEOLOCATION_PERMISSION_NOT_GRANTED
  • Method Details

    • values

      public static GeoUniq.RequestResult[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GeoUniq.RequestResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • hasResolution

      public boolean hasResolution()
      Returns true if calling startResolution(Activity) will start any intents requiring User interaction.
      Returns:
      true if there is a resolution that can be started
    • startResolution

      public void startResolution(android.app.Activity activity)
      Resolves an error by starting any intents requiring user interaction. See GEOLOCATION_UNAVAILABLE, GEOLOCATION_PERMISSION_NOT_GRANTED, and PLAY_SERVICES_RECOVERABLE_ERROR.

      The parameter activity provides an Activity object that will be used to display the appropriate Dialog.

      Parameters:
      activity - An Activity object