Language

CallControl.SetContactUri(Uri, IExecutor, IOutcomeReceiver) Method

Definition

Sets the VoIP contact URI for an ongoing call.

[Android.Runtime.Register("setContactUri", "(Landroid/net/Uri;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
public void SetContactUri(Android.Net.Uri? uri, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("setContactUri", "(Landroid/net/Uri;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
member this.SetContactUri : Android.Net.Uri * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

uri
Uri

The content URI of the contact or group in the VoIP application's contact directory or a valid CP2 contact. This URI must be stable and resolvable by the system or null if unused.

executor
IExecutor

The Executor on which the OutcomeReceiver callback will be called on.

callback
IOutcomeReceiver

The OutcomeReceiver that reports whether Telecom completed the request to set the contact URI. OutcomeReceiver#onResult is called on success. OutcomeReceiver#onError is called if the operation fails; the CallException describes the failure.

Attributes

Remarks

Sets the VoIP contact URI for an ongoing call.

Call this method when a VoIP call transitions to or from a group call, such as when a one-to-one call adds participants and becomes a conference. Call it alongside CallControl#setGroupCallState.

Providing this URI allows the Android system to correctly represent the call in the system's user interface, such as the native call log. As part of the integrated call logs feature, which provides a unified history for both carrier and VoIP calls, accurately associating the calls with a valid lookup URI is essential for a consistent user experience.

The URI identifies a contact or group in the VoIP contact directory, or a CP2 contact. The system can use it to display associated contact information, such as a name or avatar, in the integrated call log.

Android reference for android.telecom.CallControl.setContactUri.

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