Context.StartService(Intent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Request that a given application service be started.
[Android.Runtime.Register("startService", "(Landroid/content/Intent;)Landroid/content/ComponentName;", "GetStartService_Landroid_content_Intent_Handler")]
public abstract Android.Content.ComponentName? StartService (Android.Content.Intent? service);
[<Android.Runtime.Register("startService", "(Landroid/content/Intent;)Landroid/content/ComponentName;", "GetStartService_Landroid_content_Intent_Handler")>]
abstract member StartService : Android.Content.Intent -> Android.Content.ComponentName
Parameters
- service
- Intent
Identifies the service to be started. The Intent must be fully explicit (supplying a component name). Additional values may be included in the Intent extras to supply arguments along with this specific start call.
Returns
If the service is being started or is already running, the
ComponentName of the actual service that was started is
returned; else if the service does not exist null is returned.
- Attributes
Exceptions
Remarks
Java documentation for android.content.Context.startService(android.content.Intent).
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
See also
- StopService(Intent)
- <xref:Android.Content.Context.BindService(Android.Content.Intent%2c+Android.Content.IServiceConnection%2c+Android.Content.IServiceConnection)>