語言

Call.SendCallEvent(String, Bundle) 方法

定義

將Call事件從中Call傳送到所關聯ConnectionConnectionService的。

[Android.Runtime.Register("sendCallEvent", "(Ljava/lang/String;Landroid/os/Bundle;)V", "", ApiSince=25)]
public void SendCallEvent(string? e, Android.OS.Bundle? extras);
[<Android.Runtime.Register("sendCallEvent", "(Ljava/lang/String;Landroid/os/Bundle;)V", "", ApiSince=25)>]
member this.SendCallEvent : string * Android.OS.Bundle -> unit

參數

e
String
extras
Bundle

包含與事件相關的額外資訊的套裝。

屬性

備註

將Call事件從中Call傳送到所關聯ConnectionConnectionService的。

呼叫事件用於將點點資訊從 InCallService 傳送到 。ConnectionService 實作可以 ConnectionService 定義事件,使 ,例如,切換 InCallService該 的獨特功能 ConnectionService。

A ConnectionService 可以與 InCallService 使用該 Connection#sendConnectionEvent(String, Bundle)。

事件透過 暴露於 ConnectionService 實作 android.telecom.Connection#onCallEvent(String, Bundle)中。

對於遺囑如何 ConnectionService 處理這些事件,不應有任何假設。 他們 InCallService 必須假設某些 ConnectionService 事件完全忽略。

事件應具備完整限定(例如 com.example.event.MY_EVENT),以避免實作間 InCallService 的衝突。 此外, InCallService 實作不得重新利用命名空間中的 android.* 事件,也不得在此命名空間中定義自己的事件類型。 在定義自訂事件類型時,請確保額外內容 Bundle 明確定義。 此組合包的額外鍵應命名類似事件類型(例如 com.example.extra.MY_EXTRA)。

在定義事件及相關額外內容時,更新時保持其行為一致 InCallService 非常重要。 我應該維護對已棄用事件/額外內容的支援,以確保與 ConnectionService 舊有實作的向下相容,而舊實作是為了支援舊有行為而建構的。

的 android.telecom.Call.sendCallEvent(java.lang.String, android.os.Bundle)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於