语言

Service.StopSelf 方法

定义

重载

名称 说明
StopSelf()

如果服务以前已启动,请停止该服务。

StopSelf(Int32)

旧 #stopSelfResult 版本的该版本不返回结果。

StopSelf()

如果服务以前已启动,请停止该服务。

[Android.Runtime.Register("stopSelf", "()V", "")]
public void StopSelf();
[<Android.Runtime.Register("stopSelf", "()V", "")>]
member this.StopSelf : unit -> unit
特性

注解

如果服务以前已启动,请停止该服务。 这与为此特定服务调用 Context.stopService(Intent)相同。

Android 参考。android.app.Service.stopSelf

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于

StopSelf(Int32)

旧 #stopSelfResult 版本的该版本不返回结果。

[Android.Runtime.Register("stopSelf", "(I)V", "")]
public void StopSelf(int startId);
[<Android.Runtime.Register("stopSelf", "(I)V", "")>]
member this.StopSelf : int -> unit

参数

startId
Int32

int

特性

注解

不返回结果的 stopSelfResult(int) 的旧版本。

Android 参考。android.app.Service.stopSelf

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

另请参阅

适用于