MockContext.BindService(Intent, IServiceConnection, Bind) 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.
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);
[<Android.Runtime.Register("bindService", "(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z", "GetBindService_Landroid_content_Intent_Landroid_content_ServiceConnection_IHandler")>]
override this.BindService : Android.Content.Intent * Android.Content.IServiceConnection * Android.Content.Bind -> bool
Parameters
- service
- 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.
- conn
- IServiceConnection
Receives information as the service is started and stopped. This must be a valid ServiceConnection object; it must not be null.
- flags
- Bind
Operation options for the binding. May be 0, Android.Content.Context.BIND_AUTO_CREATE, Android.Content.Context.BIND_DEBUG_UNBIND, Android.Content.Context.BIND_NOT_FOREGROUND, Android.Content.Context.BIND_ABOVE_CLIENT, Android.Content.Context.BIND_ALLOW_OOM_MANAGEMENT, or Android.Content.Context.BIND_WAIVE_PRIORITY.
Returns
- Attributes
Remarks
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.