CallAttributes.Builder
public
static
final
class
CallAttributes.Builder
extends Object
java.lang.Object | |
↳ | 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, int callDirection, CharSequence displayName, Uri address)
Constructor for the CallAttributes.Builder class |
Public methods | |
---|---|
CallAttributes
|
build()
Build an instance of |
CallAttributes.Builder
|
setCallCapabilities(int callCapabilities)
Sets the capabilities of this call. |
CallAttributes.Builder
|
setCallType(int callType)
Sets the type of call; uses to indicate if a call is a video call or audio call. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (PhoneAccountHandle phoneAccountHandle, int callDirection, CharSequence displayName, Uri address)
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 CallAttributes.DIRECTION_INCOMING , or 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
public CallAttributes build ()
Build an instance of CallAttributes
based on the last values passed to the
setters or default values.
Returns | |
---|---|
CallAttributes |
an instance of CallAttributes
This value cannot be null . |
setCallCapabilities
public CallAttributes.Builder setCallCapabilities (int callCapabilities)
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 CallAttributes.SUPPORTS_SET_INACTIVE , CallAttributes.SUPPORTS_STREAM , CallAttributes.SUPPORTS_TRANSFER , and CallAttributes.SUPPORTS_VIDEO_CALLING |
Returns | |
---|---|
CallAttributes.Builder |
Builder
This value cannot be null . |
setCallType
public CallAttributes.Builder setCallType (int callType)
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 CallAttributes.AUDIO_CALL , or CallAttributes.VIDEO_CALL |
Returns | |
---|---|
CallAttributes.Builder |
Builder
This value cannot be null . |