Call.Callback | API reference | Android Developers
public
static
abstract
class
Call.Callback
extends Object
Defines callbacks which inform the InCallService of changes to a Call.
These callbacks can originate from the Telecom framework, or a ConnectionService
implementation.
You can handle these callbacks by extending the Callback class and overriding the
callbacks that your InCallService is interested in. The callback methods include the
Call for which the callback applies, allowing reuse of a single instance of your
Callback implementation, if desired.
Use Call.registerCallback(Callback) to register your callback(s). Ensure
Call.unregisterCallback(Callback) is called when you no longer require callbacks
(typically in InCallService.onCallRemoved(Call)).
Note: Callbacks which occur before you call Call.registerCallback(Callback) will not
reach your implementation of Callback, so it is important to register your callback
as soon as your InCallService is notified of a new call via
InCallService.onCallAdded(Call).
Summary
Constants | |
|---|---|
int |
HANDOVER_FAILURE_DEST_APP_REJECTED
Handover failure reason returned via |
int |
HANDOVER_FAILURE_NOT_SUPPORTED
Handover failure reason returned via |
int |
HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL
Handover failure reason returned via |
int |
HANDOVER_FAILURE_UNKNOWN
Handover failure reason returned via |
int |
HANDOVER_FAILURE_USER_REJECTED
Handover failure reason returned via |
Public constructors | |
|---|---|
Callback()
|
|
Public methods | |
|---|---|
void
|
onCallDestroyed(Call call)
Invoked when the |
void
|
onCannedTextResponsesLoaded(Call call, List<String> cannedTextResponses)
Invoked when the text messages that can be used as responses to the incoming
|
void
|
onChildrenChanged(Call call, List<Call> children)
Invoked when the children of this |
void
|
onConferenceableCallsChanged(Call call, List<Call> conferenceableCalls)
Invoked upon changes to the set of |
void
|
onConnectionEvent(Call call, String event, Bundle extras)
Invoked when a |
void
|
onDetailsChanged(Call call, Call.Details details)
Invoked when the details of this |
void
|
onHandoverComplete(Call call)
Invoked when Call handover from one |
void
|
onHandoverFailed(Call call, int failureReason)
Invoked when Call handover from one |
void
|
onParentChanged(Call call, Call parent)
Invoked when the parent of this |
void
|
onPostDialWait(Call call, String remainingPostDialSequence)
Invoked when the post-dial sequence in the outgoing |
void
|
onRttInitiationFailure(Call call, int reason)
Invoked when the RTT session failed to initiate for some reason, including rejection by the remote party. |
void
|
onRttModeChanged(Call call, int mode)
Invoked when the RTT mode changes for this call. |
void
|
onRttRequest(Call call, int id)
Invoked when the remote end of the connection has requested that an RTT communication channel be opened. |
void
|
onRttStatusChanged(Call call, boolean enabled, Call.RttCall rttCall)
Invoked when the call's RTT status changes, either from off to on or from on to off. |
void
|
onStateChanged(Call call, int state)
Invoked when the state of this |
void
|
onVideoCallChanged(Call call, InCallService.VideoCall videoCall)
Invoked when the |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
Constants
HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL
public static final int HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL
Handover failure reason returned via onHandoverFailed(Call,int) when there
is ongoing emergency call.
This error code is returned when handoverTo(PhoneAccountHandle,int,Bundle) is
called on an emergency call, or if any other call is an emergency call.
Handovers are not permitted while there are ongoing emergency calls.
For more information on call handovers, see
handoverTo(PhoneAccountHandle,int,Bundle).
Constant Value: 4 (0x00000004)
Public constructors
Callback
public Callback ()
Public methods
onCallDestroyed
public void onCallDestroyed (Call call)
Invoked when the Call is destroyed. Clients should refrain from cleaning
up their UI for the Call in response to state transitions. Specifically,
clients should not assume that a onStateChanged(Call,int) with a state of
Call.STATE_DISCONNECTED is the final notification the Call will send. Rather,
clients should wait for this method to be invoked.
| Parameters | |
|---|---|
call |
Call: The Call being destroyed. |
onCannedTextResponsesLoaded
public void onCannedTextResponsesLoaded (Call call, List<String> cannedTextResponses)
Invoked when the text messages that can be used as responses to the incoming
Call are loaded from the relevant database.
See Call.getCannedTextResponses().
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
cannedTextResponses |
List: The text messages useable as responses. |
onChildrenChanged
public void onChildrenChanged (Call call, List<Call> children)
Invoked when the children of this Call have changed. See Call.getChildren().
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
children |
List: The new children of the Call. |
onConferenceableCallsChanged
public void onConferenceableCallsChanged (Call call, List<Call> conferenceableCalls)
Invoked upon changes to the set of Calls with which this Call can be
conferenced.
| Parameters | |
|---|---|
call |
Call: The Call being updated. |
conferenceableCalls |
List: The Calls with which this Call can be
conferenced. |
onDetailsChanged
public void onDetailsChanged (Call call, Call.Details details)
Invoked when the details of this Call have changed. See Call.getDetails().
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
details |
Call.Details: A Details object describing the Call. |
onParentChanged
public void onParentChanged (Call call, Call parent)
Invoked when the parent of this Call has changed. See Call.getParent().
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
parent |
Call: The new parent of the Call. |
onPostDialWait
public void onPostDialWait (Call call, String remainingPostDialSequence)
Invoked when the post-dial sequence in the outgoing Call has reached a pause
character. This causes the post-dial signals to stop pending user confirmation. An
implementation should present this choice to the user and invoke
Call.postDialContinue(boolean) when the user makes the choice.
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
remainingPostDialSequence |
String: The post-dial characters that remain to be sent. |
onRttRequest
public void onRttRequest (Call call, int id)
Invoked when the remote end of the connection has requested that an RTT communication
channel be opened. A response to this should be sent via Call.respondToRttRequest(int, boolean)
with the same ID that this method is invoked with.
| Parameters | |
|---|---|
call |
Call: The call which the RTT request was placed on |
id |
int: The ID of the request. |
onRttStatusChanged
public void onRttStatusChanged (Call call, boolean enabled, Call.RttCall rttCall)
Invoked when the call's RTT status changes, either from off to on or from on to off.
| Parameters | |
|---|---|
call |
Call: The call whose RTT status has changed. |
enabled |
boolean: whether RTT is now enabled or disabled |
rttCall |
Call.RttCall: the RttCall object to use for reading and writing if RTT is now
on, null otherwise. |
onVideoCallChanged
public void onVideoCallChanged (Call call, InCallService.VideoCall videoCall)
Invoked when the Call.VideoCall of the Call has changed.
| Parameters | |
|---|---|
call |
Call: The Call invoking this method. |
videoCall |
InCallService.VideoCall: The Call.VideoCall associated with the Call. |