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

调用事件用于将时间点信息从 a InCallService 到 a ConnectionServiceConnectionService实现可以定义启用InCallService事件的事件,例如,切换唯一的功能ConnectionService

A ConnectionService 可以与 InCallService using 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 属性许可证中所述的术语使用。

适用于