InCallService.VideoCall
  public
  static
  
  abstract
  class
  InCallService.VideoCall
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.telecom.InCallService.VideoCall | 
Used to issue commands to the Connection.VideoProvider associated with a
 Call.
Summary
Nested classes | |
|---|---|
        
        
        
        
        class | 
      
        InCallService.VideoCall.Callback
        The   | 
    
Public constructors | |
|---|---|
      
      VideoCall()
      
      
     | 
  |
Public methods | |
|---|---|
        abstract
        
        
        
        
        void
     | 
  
    
      
      registerCallback(InCallService.VideoCall.Callback callback, Handler handler)
      
      
        Registers a callback to receive commands and state changes for video calls.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      registerCallback(InCallService.VideoCall.Callback callback)
      
      
        Registers a callback to receive commands and state changes for video calls.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      requestCallDataUsage()
      
      
        Issues a request to the   | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      requestCameraCapabilities()
      
      
        Issues a request to the   | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      sendSessionModifyRequest(VideoProfile requestProfile)
      
      
        Issues a request to modify the properties of the current video session.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      sendSessionModifyResponse(VideoProfile responseProfile)
      
      
        Provides a response to a request to change the current call video session properties.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setCamera(String cameraId)
      
      
        Sets the camera to be used for the outgoing video.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setDeviceOrientation(int rotation)
      
      
        Sets the device orientation, in degrees.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setDisplaySurface(Surface surface)
      
      
        Sets the surface to be used for displaying the video received from the remote device.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setPauseImage(Uri uri)
      
      
        Provides the   | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setPreviewSurface(Surface surface)
      
      
        Sets the surface to be used for displaying a preview of what the user's camera is currently capturing.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      setZoom(float value)
      
      
        Sets the camera zoom ratio.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      unregisterCallback(InCallService.VideoCall.Callback callback)
      
      
        Clears the video call callback set via   | 
  
Inherited methods | |
|---|---|
Public constructors
VideoCall
public VideoCall ()
Public methods
registerCallback
public abstract void registerCallback (InCallService.VideoCall.Callback callback, Handler handler)
Registers a callback to receive commands and state changes for video calls.
| Parameters | |
|---|---|
callback | 
        
          InCallService.VideoCall.Callback: The video call callback. | 
      
handler | 
        
          Handler: A handler which commands and status changes will be delivered to. | 
      
registerCallback
public abstract void registerCallback (InCallService.VideoCall.Callback callback)
Registers a callback to receive commands and state changes for video calls.
| Parameters | |
|---|---|
callback | 
        
          InCallService.VideoCall.Callback: The video call callback. | 
      
requestCallDataUsage
public abstract void requestCallDataUsage ()
Issues a request to the Connection.VideoProvider to retrieve the cumulative data
 usage for the video component of the current call (in bytes).  Data usage is reported
 to the caller via InCallService.VideoCall.Callback.onCallDataUsageChanged(long).
 
 Handled by Connection.VideoProvider.onRequestConnectionDataUsage().
requestCameraCapabilities
public abstract void requestCameraCapabilities ()
Issues a request to the Connection.VideoProvider to retrieve the capabilities
 of the current camera.  The current camera is selected using
 VideoCall.setCamera(String).
 
 Camera capabilities are reported to the caller via
 InCallService.VideoCall.Callback.onCameraCapabilitiesChanged(VideoProfile.CameraCapabilities).
 
 Handled by Connection.VideoProvider.onRequestCameraCapabilities().
sendSessionModifyRequest
public abstract void sendSessionModifyRequest (VideoProfile requestProfile)
Issues a request to modify the properties of the current video session.
 Example scenarios include: requesting an audio-only call to be upgraded to a
 bi-directional video call, turning on or off the user's camera, sending a pause signal
 when the InCallService is no longer the foreground application.
 
 Handled by
 Connection.VideoProvider.onSendSessionModifyRequest(VideoProfile, VideoProfile).
| Parameters | |
|---|---|
requestProfile | 
        
          VideoProfile: The requested call video properties. | 
      
sendSessionModifyResponse
public abstract void sendSessionModifyResponse (VideoProfile responseProfile)
Provides a response to a request to change the current call video session
 properties.  This should be called in response to a request the InCallService has
 received via InCallService.VideoCall.Callback.onSessionModifyRequestReceived(VideoProfile).
 
 Handled by
 Connection.VideoProvider.onSendSessionModifyResponse(VideoProfile).
| Parameters | |
|---|---|
responseProfile | 
        
          VideoProfile: The response call video properties. | 
      
setCamera
public abstract void setCamera (String cameraId)
Sets the camera to be used for the outgoing video.
 Handled by Connection.VideoProvider.onSetCamera(String).
| Parameters | |
|---|---|
cameraId | 
        
          String: The id of the camera (use ids as reported by
 CameraManager.getCameraIdList()). | 
      
setDeviceOrientation
public abstract void setDeviceOrientation (int rotation)
Sets the device orientation, in degrees. Assumes that a standard portrait orientation of the device is 0 degrees.
 Handled by Connection.VideoProvider.onSetDeviceOrientation(int).
| Parameters | |
|---|---|
rotation | 
        
          int: The device orientation, in degrees. | 
      
setDisplaySurface
public abstract void setDisplaySurface (Surface surface)
Sets the surface to be used for displaying the video received from the remote device.
 Handled by Connection.VideoProvider.onSetDisplaySurface(Surface).
| Parameters | |
|---|---|
surface | 
        
          Surface: The Surface. | 
      
setPauseImage
public abstract void setPauseImage (Uri uri)
Provides the Connection.VideoProvider with the Uri of an image to be
 displayed to the peer device when the video signal is paused.
 
 Handled by Connection.VideoProvider.onSetPauseImage(Uri).
| Parameters | |
|---|---|
uri | 
        
          Uri: URI of image to display. | 
      
setPreviewSurface
public abstract void setPreviewSurface (Surface surface)
Sets the surface to be used for displaying a preview of what the user's camera is currently capturing. When video transmission is enabled, this is the video signal which is sent to the remote device.
 Handled by Connection.VideoProvider.onSetPreviewSurface(Surface).
| Parameters | |
|---|---|
surface | 
        
          Surface: The Surface. | 
      
setZoom
public abstract void setZoom (float value)
Sets the camera zoom ratio.
 Handled by Connection.VideoProvider.onSetZoom(float).
| Parameters | |
|---|---|
value | 
        
          float: The camera zoom ratio; for the current camera, should be a value in the
 range defined by
 CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE. | 
      
unregisterCallback
public abstract void unregisterCallback (InCallService.VideoCall.Callback callback)
Clears the video call callback set via registerCallback(Callback).
| Parameters | |
|---|---|
callback | 
        
          InCallService.VideoCall.Callback: The video call callback to clear. | 
      
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.