IServiceConnection.OnNullBinding(ComponentName) Method

Definition

Called when the service being bound has returned null from its android.app.Service#onBind(Intent) onBind() method.

[Android.Runtime.Register("onNullBinding", "(Landroid/content/ComponentName;)V", "GetOnNullBinding_Landroid_content_ComponentName_Handler:Android.Content.IServiceConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)]
public virtual void OnNullBinding (Android.Content.ComponentName? name);
[<Android.Runtime.Register("onNullBinding", "(Landroid/content/ComponentName;)V", "GetOnNullBinding_Landroid_content_ComponentName_Handler:Android.Content.IServiceConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=28)>]
abstract member OnNullBinding : Android.Content.ComponentName -> unit
override this.OnNullBinding : Android.Content.ComponentName -> unit

Parameters

name
ComponentName

The concrete component name of the service whose binding has been rejected by the Service implementation.

Attributes

Remarks

Called when the service being bound has returned null from its android.app.Service#onBind(Intent) onBind() method. This indicates that the attempted service binding represented by this ServiceConnection will never become usable.

<p class="note"><b>Note:</b> The app that requested the binding must still call Context#unbindService(ServiceConnection) to release the tracking resources associated with this ServiceConnection even if this callback was invoked following Context#bindService Context.bindService() bindService().

Java documentation for android.content.ServiceConnection.onNullBinding(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