Android.Locations.LocationManager.RequestLocationUpdates Method
Register for location updates using a Criteria, and a callback on the specified looper thread.

Syntax

[Android.Runtime.Register("requestLocationUpdates", "(JFLandroid/location/Criteria;Landroid/location/LocationListener;Landroid/os/Looper;)V", "GetRequestLocationUpdates_JFLandroid_location_Criteria_Landroid_location_LocationListener_Landroid_os_Looper_Handler")]
public virtual void RequestLocationUpdates (long minTime, float minDistance, Criteria criteria, ILocationListener listener, Android.OS.Looper looper)

Parameters

minTime
minimum time interval between location updates, in milliseconds
minDistance
minimum distance between location updates, in meters
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 for each location update
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 location updates using a Criteria, and a callback on the specified looper thread.

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