Class LocationRequest
java.lang.Object
com.arubanetworks.meridian.location.LocationRequest
LocationRequest handles getting the current location of the device for a one time use.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Error states for a location request.static interface
A listener for receiving the results of the request. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final long
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels this request.boolean
Returnstrue
if this request is still running.static LocationRequest
requestCurrentLocation
(Context context, EditorKey appKey, LocationRequest.LocationRequestListener responseListener) Builds and starts a LocationRequest with the given parameters.static LocationRequest
requestCurrentLocation
(Context context, EditorKey appKey, LocationRequest.LocationRequestListener responseListener, long timeOutInMilliseconds) Builds and starts a LocationRequest with the given parameters.static LocationRequest
requestCurrentLocation
(Context context, EditorKey appKey, LocationRequest.LocationRequestListener responseListener, long timeOutInMilliseconds, long maxAgeInMilliseconds) Builds and starts a LocationRequest with the given parameters.
-
Field Details
-
DEFAULT_TIME_OUT
public static final long DEFAULT_TIME_OUT- See Also:
-
DEFAULT_MAX_AGE
public static final long DEFAULT_MAX_AGE- See Also:
-
-
Method Details
-
cancel
public void cancel()Cancels this request. -
isRunning
public boolean isRunning()Returnstrue
if this request is still running. -
requestCurrentLocation
public static LocationRequest requestCurrentLocation(Context context, EditorKey appKey, LocationRequest.LocationRequestListener responseListener) Builds and starts a LocationRequest with the given parameters. -
requestCurrentLocation
public static LocationRequest requestCurrentLocation(Context context, EditorKey appKey, LocationRequest.LocationRequestListener responseListener, long timeOutInMilliseconds) Builds and starts a LocationRequest with the given parameters. -
requestCurrentLocation
public static LocationRequest requestCurrentLocation(@NonNull Context context, @NonNull EditorKey appKey, @NonNull LocationRequest.LocationRequestListener responseListener, long timeOutInMilliseconds, long maxAgeInMilliseconds) Builds and starts a LocationRequest with the given parameters.
-