Service.OnTaskRemoved(Intent) Method

Definition

This is called if the service is currently running and the user has removed a task that comes from the service's application.

C#
[Android.Runtime.Register("onTaskRemoved", "(Landroid/content/Intent;)V", "GetOnTaskRemoved_Landroid_content_Intent_Handler")]
public virtual void OnTaskRemoved (Android.Content.Intent? rootIntent);

Parameters

rootIntent
Intent

The original root Intent that was used to launch the task that is being removed.

Attributes

Remarks

This is called if the service is currently running and the user has removed a task that comes from the service's application. If you have set android.content.pm.ServiceInfo#FLAG_STOP_WITH_TASK ServiceInfo.FLAG_STOP_WITH_TASK then you will not receive this callback; instead, the service will simply be stopped.

Java documentation for android.app.Service.onTaskRemoved(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

Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35