IServiceConnection.OnServiceConnected(ComponentName, IBinder) 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.
Called when a connection to the Service has been established, with
the android.os.IBinder
of the communication channel to the
Service.
[Android.Runtime.Register("onServiceConnected", "(Landroid/content/ComponentName;Landroid/os/IBinder;)V", "GetOnServiceConnected_Landroid_content_ComponentName_Landroid_os_IBinder_Handler:Android.Content.IServiceConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnServiceConnected (Android.Content.ComponentName? name, Android.OS.IBinder? service);
[<Android.Runtime.Register("onServiceConnected", "(Landroid/content/ComponentName;Landroid/os/IBinder;)V", "GetOnServiceConnected_Landroid_content_ComponentName_Landroid_os_IBinder_Handler:Android.Content.IServiceConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnServiceConnected : Android.Content.ComponentName * Android.OS.IBinder -> unit
Parameters
- name
- ComponentName
The concrete component name of the service that has been connected.
- service
- IBinder
The IBinder of the Service's communication channel, which you can now make calls on.
- Attributes
Remarks
Called when a connection to the Service has been established, with the android.os.IBinder
of the communication channel to the Service.
<p class="note"><b>Note:</b> If the system has started to bind your client app to a service, it's possible that your app will never receive this callback. Your app won't receive a callback if there's an issue with the service, such as the service crashing while being created.
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.