Partager via


NotificationListenerService.RequestUnbind Method

Definition

Overloads

RequestUnbind()

Request that the service be unbound.

RequestUnbind(ComponentName)

Request that the service be unbound.

RequestUnbind()

Request that the service be unbound.

[Android.Runtime.Register("requestUnbind", "()V", "", ApiSince=24)]
public void RequestUnbind ();
[<Android.Runtime.Register("requestUnbind", "()V", "", ApiSince=24)>]
member this.RequestUnbind : unit -> unit
Attributes

Remarks

Request that the service be unbound.

Once this is called, you will no longer receive updates and no method calls are guaranteed to be successful, until you next receive the #onListenerConnected() event. The service will likely be killed by the system after this call.

The service should wait for the #onListenerConnected() event before performing this operation. I know it's tempting, but you must wait.

Java documentation for android.service.notification.NotificationListenerService.requestUnbind().

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

RequestUnbind(ComponentName)

Request that the service be unbound.

[Android.Runtime.Register("requestUnbind", "(Landroid/content/ComponentName;)V", "", ApiSince=34)]
public static void RequestUnbind (Android.Content.ComponentName componentName);
[<Android.Runtime.Register("requestUnbind", "(Landroid/content/ComponentName;)V", "", ApiSince=34)>]
static member RequestUnbind : Android.Content.ComponentName -> unit

Parameters

componentName
ComponentName
Attributes

Remarks

Request that the service be unbound.

This method will fail for components that are not part of the calling app.

Java documentation for android.service.notification.NotificationListenerService.requestUnbind(android.content.ComponentName).

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