다음을 통해 공유


LocationManager.RemoveUpdates Method

Definition

Overloads

RemoveUpdates(PendingIntent)

Removes location updates for the specified PendingIntent.

RemoveUpdates(ILocationListener)

Removes all location updates for the specified LocationListener.

RemoveUpdates(PendingIntent)

Removes location updates for the specified PendingIntent.

[Android.Runtime.Register("removeUpdates", "(Landroid/app/PendingIntent;)V", "GetRemoveUpdates_Landroid_app_PendingIntent_Handler")]
public virtual void RemoveUpdates (Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register("removeUpdates", "(Landroid/app/PendingIntent;)V", "GetRemoveUpdates_Landroid_app_PendingIntent_Handler")>]
abstract member RemoveUpdates : Android.App.PendingIntent -> unit
override this.RemoveUpdates : Android.App.PendingIntent -> unit

Parameters

pendingIntent
PendingIntent

pending intent that no longer needs location updates

Attributes

Exceptions

if intent is null

Remarks

Removes location updates for the specified PendingIntent. Following this call, the PendingIntent will no longer receive location updates.

See #removeUpdates(LocationListener) for more detail on how this method works.

Java documentation for android.location.LocationManager.removeUpdates(android.app.PendingIntent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

RemoveUpdates(ILocationListener)

Removes all location updates for the specified LocationListener.

[Android.Runtime.Register("removeUpdates", "(Landroid/location/LocationListener;)V", "GetRemoveUpdates_Landroid_location_LocationListener_Handler")]
public virtual void RemoveUpdates (Android.Locations.ILocationListener listener);
[<Android.Runtime.Register("removeUpdates", "(Landroid/location/LocationListener;)V", "GetRemoveUpdates_Landroid_location_LocationListener_Handler")>]
abstract member RemoveUpdates : Android.Locations.ILocationListener -> unit
override this.RemoveUpdates : Android.Locations.ILocationListener -> unit

Parameters

listener
ILocationListener

listener that no longer needs location updates

Attributes

Exceptions

if listener is null

Remarks

Removes all location updates for the specified LocationListener. The given listener is guaranteed not to receive any invocations that <b>happens-after</b> this method is invoked.

If the given listener has any batched requests, this method will not flush any incomplete location batches before stopping location updates. If you wish to flush any pending locations before stopping, you must first call #requestFlush(String, LocationListener, int) and then call this method once the flush is complete. If this method is invoked before the flush is complete, you may not receive the flushed locations.

Java documentation for android.location.LocationManager.removeUpdates(android.location.LocationListener).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to