语言

LocationManager.RemoveUpdates 方法

定义

重载

名称 说明
RemoveUpdates(PendingIntent)

删除指定 PendingIntent的位置更新。

RemoveUpdates(ILocationListener)

删除指定 LocationListener的所有位置更新。

RemoveUpdates(PendingIntent)

删除指定 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

参数

pendingIntent
PendingIntent

不再需要位置更新的挂起意向

特性

例外

如果意向为 null

注解

删除指定 PendingIntent的位置更新。 在此调用后,PendingIntent 将不再接收位置更新。

有关此方法工作原理的详细信息,请参阅 #removeUpdates(LocationListener) 。

Java文档android.location.LocationManager.removeUpdates(android.app.PendingIntent)。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

RemoveUpdates(ILocationListener)

删除指定 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

参数

listener
ILocationListener

不再需要位置更新的侦听器

特性

例外

如果侦听器为 null,则为

注解

删除指定 LocationListener的所有位置更新。 保证给定侦听器不会接收在调用此方法 后发生 的任何调用。

如果给定侦听器有任何批处理请求,则此方法在停止位置更新之前不会刷新任何不完整的位置批处理。 如果要在停止之前刷新任何挂起的位置,必须先调用 #requestFlush(String, LocationListener, int) ,然后在刷新完成后调用此方法。 如果在刷新完成后调用此方法,则可能不会收到刷新的位置。

Java文档android.location.LocationManager.removeUpdates(android.location.LocationListener)。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于