AbstractInputMethodService.OnBind(Intent) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将信道返回到服务。
[Android.Runtime.Register("onBind", "(Landroid/content/Intent;)Landroid/os/IBinder;", "")]
public override sealed Android.OS.IBinder? OnBind(Android.Content.Intent? intent);
[<Android.Runtime.Register("onBind", "(Landroid/content/Intent;)Landroid/os/IBinder;", "")>]
override this.OnBind : Android.Content.Intent -> Android.OS.IBinder
参数
- intent
- Intent
用于绑定到此服务的意向,如提供给 M:Android.Content.Context.BindService(Android.Content.Intent,Android.Content.IServiceConnection,Android.Content.IServiceConnection),意向。 请注意,此时 不会 看到意向附带的任何额外内容。
返回
返回一个 IBinder,客户端可以通过该 IBinder 调用该服务。
- 属性
注解
将信道返回到服务。 如果客户端无法绑定到服务,则可能会返回 null。 返回的 IBinder 通常适用于使用 aidl 描述的复杂接口。
请注意,与其他应用程序组件不同,对此处返回的 IBinder 接口的调用可能不会发生在进程的主线程上。 有关主线程的详细信息,请参阅进程和线程。
Android 参考。android.inputmethodservice.AbstractInputMethodService.onBind
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。