Enum GeoUniq.RequestResult
- java.lang.Object
-
- java.lang.Enum<GeoUniq.RequestResult>
-
- com.geouniq.android.GeoUniq.RequestResult
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<GeoUniq.RequestResult>
- Enclosing class:
- GeoUniq
public static enum GeoUniq.RequestResult extends java.lang.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 theGeoUniq.IErrorListener.onError(GeoUniq.RequestResult)callback is called.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BACKGROUND_GEOLOCATION_PERMISSION_NOT_GRANTEDGEOLOCATION_PERMISSION_NOT_GRANTEDRefers to a location request performed by callingGeoUniq.getLocation(float, ILocationListener, IErrorListener)or to the tracking functionality.GEOLOCATION_UNAVAILABLERefers to a location request performed by callingGeoUniq.getLocation(float, ILocationListener, IErrorListener)or to the tracking functionality.LOCATION_NOT_DETECTEDRefers to a location request performed by callingGeoUniq.getLocation(float, ILocationListener, IErrorListener).PLAY_SERVICES_RECOVERABLE_ERRORRefers to a request that needs Google Play Services to be performed.PLAY_SERVICES_UNRECOVERABLE_ERRORRefers to a request that needs Google Play Services to be performed.SUCCESSThe request was successful.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasResolution()Returnstrueif callingstartResolution(Activity)will start any intents requiring User interaction.voidstartResolution(android.app.Activity activity)Resolves an error by starting any intents requiring user interaction.static GeoUniq.RequestResultvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static GeoUniq.RequestResult[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 callingGeoUniq.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 callingGeoUniq.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 callingGeoUniq.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 Detail
-
values
public static GeoUniq.RequestResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GeoUniq.RequestResult c : GeoUniq.RequestResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeoUniq.RequestResult valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
hasResolution
public boolean hasResolution()
Returnstrueif callingstartResolution(Activity)will start any intents requiring User interaction.- Returns:
trueif 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. SeeGEOLOCATION_UNAVAILABLE,GEOLOCATION_PERMISSION_NOT_GRANTED, andPLAY_SERVICES_RECOVERABLE_ERROR.
The parameter
activityprovides anActivityobject that will be used to display the appropriate Dialog.- Parameters:
activity- AnActivityobject
-
-