Udostępnij za pośrednictwem


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.

[Android.Runtime.Register("onTaskRemoved", "(Landroid/content/Intent;)V", "GetOnTaskRemoved_Landroid_content_Intent_Handler")]
public virtual void OnTaskRemoved (Android.Content.Intent? rootIntent);
[<Android.Runtime.Register("onTaskRemoved", "(Landroid/content/Intent;)V", "GetOnTaskRemoved_Landroid_content_Intent_Handler")>]
abstract member OnTaskRemoved : Android.Content.Intent -> unit
override this.OnTaskRemoved : Android.Content.Intent -> unit

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