ContextWrapper.BindService(Intent, IServiceConnection, Bind) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Connectez-vous à un service d’application, en le créant si nécessaire.
[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
Paramètres
- service
- Intent
Identifie le service auquel se connecter. L’intention peut spécifier un nom de composant explicite ou une description logique (action, catégorie, etc.) pour qu’elle corresponde à une IntentFilter version publiée par un service.
- conn
- IServiceConnection
Reçoit des informations au démarrage et à l’arrêt du service. Il doit s’agir d’un objet ServiceConnection valide ; elle ne doit pas être null.
- flags
- Bind
Options d’opération pour la liaison. Peut être 0, , , , , ou .
Retours
- Attributs
Remarques
Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.