Android.Locations.LocationManager.RequestSingleUpdate Method
Register for a single location update using a Criteria and a callback.

Syntax

[Android.Runtime.Register("requestSingleUpdate", "(Landroid/location/Criteria;Landroid/location/LocationListener;Landroid/os/Looper;)V", "GetRequestSingleUpdate_Landroid_location_Criteria_Landroid_location_LocationListener_Landroid_os_Looper_Handler")]
public virtual void RequestSingleUpdate (Criteria criteria, ILocationListener listener, Android.OS.Looper looper)

Parameters

criteria
contains parameters for the location manager to choose the appropriate provider and parameters to compute the location
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 criteria is null
Java.Lang.IllegalArgumentExceptionif listener is null
Java.Lang.SecurityExceptionif no suitable permission is present

Remarks

Register for a single location update using a Criteria 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