语言

Service.OnStart(Intent, Int32) 方法

定义

注意

deprecated

此方法在 API 级别 15 中已弃用。

[Android.Runtime.Register("onStart", "(Landroid/content/Intent;I)V", "GetOnStart_Landroid_content_Intent_IHandler")]
[System.Obsolete("deprecated")]
public virtual void OnStart(Android.Content.Intent? intent, int startId);
[<Android.Runtime.Register("onStart", "(Landroid/content/Intent;I)V", "GetOnStart_Landroid_content_Intent_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member OnStart : Android.Content.Intent * int -> unit
override this.OnStart : Android.Content.Intent * int -> unit

参数

intent
Intent

意图

startId
Int32

int

特性

注解

此方法在 API 级别 15 中已弃用。 改为实现 onStartCommand(Intent,int,int)。

Android 参考。android.app.Service.onStart

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

适用于