public
static
abstract
class
InCallService.VideoCall.Callback
extends Object
java.lang.Object | |
↳ | android.telecom.InCallService.VideoCall.Callback |
The InCallService
extends this class to provide a means of receiving callbacks
from the Connection.VideoProvider
.
When the InCallService
receives the
onVideoCallChanged(Call, VideoCall)
callback, it should create an
instance its InCallService.VideoCall.Callback
implementation and set it on the
InCallService.VideoCall
using registerCallback(Callback)
.
Public constructors | |
---|---|
InCallService.VideoCall.Callback()
|
Public methods | |
---|---|
abstract
void
|
onCallDataUsageChanged(long dataUsage)
Handles an update to the total data used for the current video session. |
abstract
void
|
onCallSessionEvent(int event)
Handles events related to the current video session which the |
abstract
void
|
onCameraCapabilitiesChanged(VideoProfile.CameraCapabilities cameraCapabilities)
Handles a change in the capabilities of the currently selected camera. |
abstract
void
|
onPeerDimensionsChanged(int width, int height)
Handles a change to the video dimensions from the peer device. |
abstract
void
|
onSessionModifyRequestReceived(VideoProfile videoProfile)
Called when the |
abstract
void
|
onSessionModifyResponseReceived(int status, VideoProfile requestedProfile, VideoProfile responseProfile)
Called when the |
abstract
void
|
onVideoQualityChanged(int videoQuality)
Handles a change to the video quality. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
void onCallDataUsageChanged (long dataUsage)
Handles an update to the total data used for the current video session.
Used by the Connection.VideoProvider
in response to
requestCallDataUsage()
. May also be called periodically by the
Connection.VideoProvider
.
Callback originates from setCallDataUsage(long)
.
Parameters | |
---|---|
dataUsage |
long :
The updated data usage (in bytes).
|
void onCallSessionEvent (int event)
Handles events related to the current video session which the InCallService
may wish to handle. These are separate from requested changes to the session due to
the underlying protocol or connection.
Callback originates from
handleCallSessionEvent(int)
.
Parameters | |
---|---|
event |
int :
The event. Valid values are:
SESSION_EVENT_RX_PAUSE ,
SESSION_EVENT_RX_RESUME ,
SESSION_EVENT_TX_START ,
SESSION_EVENT_TX_STOP ,
SESSION_EVENT_CAMERA_FAILURE ,
SESSION_EVENT_CAMERA_READY .
|
void onCameraCapabilitiesChanged (VideoProfile.CameraCapabilities cameraCapabilities)
Handles a change in the capabilities of the currently selected camera.
Used by the Connection.VideoProvider
in response to
requestCameraCapabilities()
. The Connection.VideoProvider
may also report the camera capabilities after a call to
setCamera(String)
.
Callback originates from
changeCameraCapabilities(VideoProfile.CameraCapabilities)
.
Parameters | |
---|---|
cameraCapabilities |
VideoProfile.CameraCapabilities :
The changed camera capabilities.
|
void onPeerDimensionsChanged (int width, int height)
Handles a change to the video dimensions from the peer device. This could happen if, for example, the peer changes orientation of their device, or switches cameras.
Callback originates from
changePeerDimensions(int, int)
.
Parameters | |
---|---|
width |
int :
The updated peer video width. |
height |
int :
The updated peer video height.
|
void onSessionModifyRequestReceived (VideoProfile videoProfile)
Called when the Connection.VideoProvider
receives a session modification
request from the peer device.
The InCallService
may potentially prompt the user to confirm whether they
wish to accept the request, or decide to automatically accept the request. In either
case the InCallService
should call
sendSessionModifyResponse(VideoProfile)
to indicate the video
profile agreed upon.
Callback originates from
receiveSessionModifyRequest(VideoProfile)
.
Parameters | |
---|---|
videoProfile |
VideoProfile :
The requested video profile.
|
void onSessionModifyResponseReceived (int status, VideoProfile requestedProfile, VideoProfile responseProfile)
Called when the Connection.VideoProvider
receives a response to a session
modification request previously sent to the peer device.
The new video state should not be considered active by the InCallService
until the Call
video state changes (the
onDetailsChanged(Call, Call.Details)
callback is triggered
when the video state changes).
Callback originates from
receiveSessionModifyResponse(int, VideoProfile, VideoProfile)
.
Parameters | |
---|---|
status |
int :
Status of the session modify request. Valid values are
SESSION_MODIFY_REQUEST_SUCCESS ,
SESSION_MODIFY_REQUEST_FAIL ,
SESSION_MODIFY_REQUEST_INVALID ,
SESSION_MODIFY_REQUEST_TIMED_OUT ,
SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE . |
requestedProfile |
VideoProfile :
The original request which was sent to the peer device. |
responseProfile |
VideoProfile :
The actual profile changes made by the peer device.
|
void onVideoQualityChanged (int videoQuality)
Handles a change to the video quality.
Callback originates from changeVideoQuality(int)
.
Parameters | |
---|---|
videoQuality |
int :
The updated peer video quality. Valid values:
QUALITY_HIGH ,
QUALITY_MEDIUM ,
QUALITY_LOW ,
QUALITY_DEFAULT .
|