語言

AbstractInputMethodService.OnBind(Intent) 方法

定義

把通訊頻道還給服務單位。

[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,讓客戶端可以呼叫該服務。

屬性

備註

把通訊頻道還給服務單位。 若客戶端無法綁定服務,可能會回傳 null。 回傳的 IBinder 通常是針對已使用 aidl 描述的複雜介面。

請注意,與其他應用程式元件不同,這裡回傳的 IBinder 介面呼叫可能不會發生在程序的主執行緒上。 關於主線程的更多資訊可參考「程序與執行緒」。

Android 參考資料。android.inputmethodservice.AbstractInputMethodService.onBind

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於