語言

IServiceConnection.OnServiceDisconnected(ComponentName) 方法

定義

當與服務失去連線時會被撥打。

[Android.Runtime.Register("onServiceDisconnected", "(Landroid/content/ComponentName;)V", "GetOnServiceDisconnected_Landroid_content_ComponentName_Handler:Android.Content.IServiceConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnServiceDisconnected(Android.Content.ComponentName? name);
[<Android.Runtime.Register("onServiceDisconnected", "(Landroid/content/ComponentName;)V", "GetOnServiceDisconnected_Landroid_content_ComponentName_Handler:Android.Content.IServiceConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnServiceDisconnected : Android.Content.ComponentName -> unit

參數

name
ComponentName

該服務的具體組件名稱,該服務已失去連接。

屬性

備註

當與服務失去連線時會被撥打。 這通常是在服務所承載的程序當機或被終止時發生。 這 並不會 移除 ServiceConnection 本身——此服務綁定仍會持續有效,您將收到通知,告知 #onServiceConnected 服務下一次執行時間。

Java 文件 android.content.ServiceConnection.onServiceDisconnected(android.content.ComponentName)。

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

適用於