IntentService.OnBind(Intent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
deprecated
除非你為服務提供綁定,否則不需要實作這個方法,因為預設實作會回傳 null。
[Android.Runtime.Register("onBind", "(Landroid/content/Intent;)Landroid/os/IBinder;", "GetOnBind_Landroid_content_Intent_Handler")]
[System.Obsolete("deprecated")]
public override Android.OS.IBinder? OnBind(Android.Content.Intent? intent);
[<Android.Runtime.Register("onBind", "(Landroid/content/Intent;)Landroid/os/IBinder;", "GetOnBind_Landroid_content_Intent_Handler")>]
[<System.Obsolete("deprecated")>]
override this.OnBind : Android.Content.Intent -> Android.OS.IBinder
參數
- intent
- Intent
意圖:用於綁定本服務的意圖,依 Context.bindService 提供。 請注意,當時隨意圖附帶的任何額外內容在這裡都不會看到。
傳回
回傳一個 IBinder,讓客戶端可以呼叫該服務。
- 屬性
備註
除非你為服務提供綁定,否則不需要實作這個方法,因為預設實作會回傳 null。
另請參閱:
Android 參考資料。android.app.IntentService.onBind
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。