Android.Locations.LocationManager.RequestSingleUpdate Method
Register for a single location update using the named provider and a callback.

Syntax

[Android.Runtime.Register("requestSingleUpdate", "(Ljava/lang/String;Landroid/location/LocationListener;Landroid/os/Looper;)V", "GetRequestSingleUpdate_Ljava_lang_String_Landroid_location_LocationListener_Landroid_os_Looper_Handler")]
public virtual void RequestSingleUpdate (string provider, ILocationListener listener, Android.OS.Looper looper)

Parameters

provider
the name of the provider with which to register
listener
a Android.Locations.ILocationListener whose ILocationListener.OnLocationChanged(Location) method will be called when the location update is available
looper
a Looper object whose message queue will be used to implement the callback mechanism, or null to make callbacks on the calling thread

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif provider is null or doesn't exist
Java.Lang.IllegalArgumentExceptionif listener is null
Java.Lang.SecurityExceptionif no suitable permission is present

Remarks

Register for a single location update using the named provider and a callback.

See LocationManager.RequestLocationUpdates(long, System.Single, System.Single, System.Single) for more detail on how to use this method.

[Android Documentation]

Requirements

Namespace: Android.Locations
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9