Aracılığıyla paylaş


MockContext.BindService(Intent, IServiceConnection, Bind) Method

Definition

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.

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.

Applies to