共用方式為


ContextWrapper.StartService(Intent) Method

Definition

Request that a given application service be started.

[Android.Runtime.Register("startService", "(Landroid/content/Intent;)Landroid/content/ComponentName;", "GetStartService_Landroid_content_Intent_Handler")]
public override Android.Content.ComponentName? StartService (Android.Content.Intent? service);
[<Android.Runtime.Register("startService", "(Landroid/content/Intent;)Landroid/content/ComponentName;", "GetStartService_Landroid_content_Intent_Handler")>]
override this.StartService : Android.Content.Intent -> Android.Content.ComponentName

Parameters

service
Intent

Identifies the service to be started. The Intent must be either fully explicit (supplying a component name) or specify a specific package name it is targetted to. Additional values may be included in the Intent extras to supply arguments along with this specific start call.

Returns

Attributes

Remarks

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