MockContext.BindService(Intent, IServiceConnection, Bind) MockContext.BindService(Intent, IServiceConnection, Bind) Method


Connect to an application service, creating it if needed.

[Android.Runtime.Register("bindService", "(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z", "GetBindService_Landroid_content_Intent_Landroid_content_ServiceConnection_IHandler")]
public override bool BindService (Android.Content.Intent service, Android.Content.IServiceConnection conn, Android.Content.Bind flags);
override this.BindService : Android.Content.Intent * Android.Content.IServiceConnection * Android.Content.Bind -> bool


Intent Intent

Identifies the service to connect to. The Intent may specify either an explicit component name, or a logical description (action, category, etc) to match an IntentFilter published by a service.

IServiceConnection IServiceConnection

Receives information as the service is started and stopped. This must be a valid ServiceConnection object; it must not be null.



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