Call.SendCallEvent(String, Bundle) Method

Definition

Sends a Call event from this Call to the associated Connection in the ConnectionService.

[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

Parameters

e
String
extras
Bundle

Bundle containing extra information associated with the event.

Attributes

Remarks

Sends a Call event from this Call to the associated Connection in the ConnectionService.

Call events are used to communicate point in time information from an InCallService to a ConnectionService. A ConnectionService implementation could define events which enable the InCallService, for example, toggle a unique feature of the ConnectionService.

A ConnectionService can communicate to the InCallService using Connection#sendConnectionEvent(String, Bundle).

Events are exposed to ConnectionService implementations via android.telecom.Connection#onCallEvent(String, Bundle).

No assumptions should be made as to how a ConnectionService will handle these events. The InCallService must assume that the ConnectionService could chose to ignore some events altogether.

Events should be fully qualified (e.g., com.example.event.MY_EVENT) to avoid conflicts between InCallService implementations. Further, InCallService implementations shall not re-purpose events in the android.* namespace, nor shall they define their own event types in this namespace. When defining a custom event type, ensure the contents of the extras Bundle is clearly defined. Extra keys for this bundle should be named similar to the event type (e.g. com.example.extra.MY_EXTRA).

When defining events and the associated extras, it is important to keep their behavior consistent when the associated InCallService is updated. Support for deprecated events/extras should me maintained to ensure backwards compatibility with older ConnectionService implementations which were built to support the older behavior.

Java documentation for android.telecom.Call.sendCallEvent(java.lang.String, android.os.Bundle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to