Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.telecom.CallAttributes.Builder

Build an instance of CallAttributes. In order to build a valid instance, a PhoneAccountHandle, call direction, display name, and Uri address are required.

Note: Pass in the same PhoneAccountHandle that was used to register a PhoneAccount with Telecom. see TelecomManager#registerPhoneAccount

Summary

Public constructors
Builder(phoneAccountHandle: PhoneAccountHandle, callDirection: Int, displayName: CharSequence, address: Uri)

Constructor for the CallAttributes.

Public methods
CallAttributes

Build an instance of CallAttributes based on the last values passed to the setters or default values.

CallAttributes.Builder
setCallCapabilities(callCapabilities: Int)

Sets the capabilities of this call.

CallAttributes.Builder
setCallType(callType: Int)

Sets the type of call; uses to indicate if a call is a video call or audio call.

Public constructors

Builder

Added in API level 34
Builder(
    phoneAccountHandle: PhoneAccountHandle,
    callDirection: Int,
    displayName: CharSequence,
    address: Uri)

Constructor for the CallAttributes.Builder class

Parameters
phoneAccountHandle PhoneAccountHandle: that belongs to package registered with Telecom This value cannot be null.
callDirection Int: of the new call that will be added to Telecom Value is android.telecom.CallAttributes#DIRECTION_INCOMING, or android.telecom.CallAttributes#DIRECTION_OUTGOING
displayName CharSequence: of the caller for incoming calls or initiating user for outgoing calls This value cannot be null.
address Uri: of the caller for incoming calls or destination for outgoing calls This value cannot be null.

Public methods

build

Added in API level 34
fun build(): CallAttributes

Build an instance of CallAttributes based on the last values passed to the setters or default values.

Return
CallAttributes an instance of CallAttributes This value cannot be null.

setCallCapabilities

Added in API level 34
fun setCallCapabilities(callCapabilities: Int): CallAttributes.Builder

Sets the capabilities of this call. Use this to indicate whether your app supports holding, streaming and call transfers.

Parameters
callCapabilities Int: Bitmask of call capabilities. Value is either 0 or a combination of android.telecom.CallAttributes#SUPPORTS_SET_INACTIVE, android.telecom.CallAttributes#SUPPORTS_STREAM, android.telecom.CallAttributes#SUPPORTS_TRANSFER, and android.telecom.CallAttributes#SUPPORTS_VIDEO_CALLING
Return
CallAttributes.Builder Builder This value cannot be null.

setCallType

Added in API level 34
fun setCallType(callType: Int): CallAttributes.Builder

Sets the type of call; uses to indicate if a call is a video call or audio call.

Parameters
callType Int: The call type. Value is android.telecom.CallAttributes#AUDIO_CALL, or android.telecom.CallAttributes#VIDEO_CALL
Return
CallAttributes.Builder Builder This value cannot be null.