Android.Locations.LocationManager.RequestLocationUpdates Method
Register for location updates using the named provider, and a pending intent.

Syntax

[Android.Runtime.Register("requestLocationUpdates", "(Ljava/lang/String;JFLandroid/location/LocationListener;)V", "GetRequestLocationUpdates_Ljava_lang_String_JFLandroid_location_LocationListener_Handler")]
public virtual void RequestLocationUpdates (string provider, long minTime, float minDistance, ILocationListener listener)

Parameters

provider
the name of the provider with which to register
minTime
minimum time interval between location updates, in milliseconds
minDistance
minimum distance between location updates, in meters
listener
a Android.Locations.ILocationListener whose ILocationListener.OnLocationChanged(Location) method will be called for each location update

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif provider is null or doesn't exist on this device
Java.Lang.IllegalArgumentExceptionif listener is null
Java.Lang.RuntimeExceptionif the calling thread has no Looper
Java.Lang.SecurityExceptionif no suitable permission is present

Remarks

Register for location updates using the named provider, and a pending intent.

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 1