Android APIs
public class

VideoProfile

extends Object
implements Parcelable
java.lang.Object
   ↳ android.telecom.VideoProfile

Class Overview

Represents attributes of video calls.

Summary

Nested Classes
class VideoProfile.CameraCapabilities Represents the camera capabilities important to a Video Telephony provider. 
Constants
int QUALITY_DEFAULT Use default video quality.
int QUALITY_HIGH "High" video quality.
int QUALITY_LOW "Low" video quality.
int QUALITY_MEDIUM "Medium" video quality.
int STATE_AUDIO_ONLY Used when answering or dialing a call to indicate that the call does not have a video component.
int STATE_BIDIRECTIONAL Video signal is bi-directional.
int STATE_PAUSED Video is paused.
int STATE_RX_ENABLED Video reception is enabled.
int STATE_TX_ENABLED Video transmission is enabled.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<VideoProfile> CREATOR Responsible for creating VideoProfile objects from deserialized Parcels.
Public Constructors
VideoProfile(int videoState)
Creates an instance of the VideoProfile
VideoProfile(int videoState, int quality)
Creates an instance of the VideoProfile
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getQuality()
The desired video quality for the call.
int getVideoState()
The video state of the call.
static boolean isAudioOnly(int videoState)
Indicates whether the video state is audio only.
static boolean isBidirectional(int videoState)
Indicates whether the video state is bi-directional.
static boolean isPaused(int videoState)
Indicates whether the video state is paused.
static boolean isReceptionEnabled(int videoState)
Indicates whether the video state has video reception enabled.
static boolean isTransmissionEnabled(int videoState)
Indicates whether the video state has video transmission enabled.
static boolean isVideo(int videoState)
Indicates whether video transmission or reception is enabled for a video state.
String toString()
Returns a string containing a concise, human-readable description of this object.
static String videoStateToString(int videoState)
Generates a string representation of a video state.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int QUALITY_DEFAULT

Added in API level 23

Use default video quality.

Constant Value: 4 (0x00000004)

public static final int QUALITY_HIGH

Added in API level 23

"High" video quality.

Constant Value: 1 (0x00000001)

public static final int QUALITY_LOW

Added in API level 23

"Low" video quality.

Constant Value: 3 (0x00000003)

public static final int QUALITY_MEDIUM

Added in API level 23

"Medium" video quality.

Constant Value: 2 (0x00000002)

public static final int STATE_AUDIO_ONLY

Added in API level 23

Used when answering or dialing a call to indicate that the call does not have a video component.

Should not be used in comparison checks to determine if a video state represents an audio-only call.

The following, for example, is not the correct way to check if a call is audio-only:

 // This is the incorrect way to check for an audio-only call.
 if (videoState == VideoProfile.STATE_AUDIO_ONLY) {
      // Handle audio-only call.
 
 }
 

Instead, use the isAudioOnly(int) helper function to check if a video state represents an audio-only call:

 // This is the correct way to check for an audio-only call.
 if (VideoProfile.isAudioOnly(videoState)) {
      // Handle audio-only call.
 
 }
 

Constant Value: 0 (0x00000000)

public static final int STATE_BIDIRECTIONAL

Added in API level 23

Video signal is bi-directional.

Constant Value: 3 (0x00000003)

public static final int STATE_PAUSED

Added in API level 23

Video is paused.

Constant Value: 4 (0x00000004)

public static final int STATE_RX_ENABLED

Added in API level 23

Video reception is enabled.

Constant Value: 2 (0x00000002)

public static final int STATE_TX_ENABLED

Added in API level 23

Video transmission is enabled.

Constant Value: 1 (0x00000001)

Fields

public static final Creator<VideoProfile> CREATOR

Added in API level 23

Responsible for creating VideoProfile objects from deserialized Parcels.

Public Constructors

public VideoProfile (int videoState)

Added in API level 23

Creates an instance of the VideoProfile

Parameters
videoState The video state.

public VideoProfile (int videoState, int quality)

Added in API level 23

Creates an instance of the VideoProfile

Parameters
videoState The video state.
quality The video quality.

Public Methods

public int describeContents ()

Added in API level 23

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public int getQuality ()

Added in API level 23

The desired video quality for the call. Valid values: QUALITY_HIGH, QUALITY_MEDIUM, QUALITY_LOW, QUALITY_DEFAULT.

public int getVideoState ()

Added in API level 23

The video state of the call. Valid values: STATE_AUDIO_ONLY, STATE_BIDIRECTIONAL, STATE_TX_ENABLED, STATE_RX_ENABLED, STATE_PAUSED.

public static boolean isAudioOnly (int videoState)

Added in API level 23

Indicates whether the video state is audio only.

Parameters
videoState The video state.
Returns
  • True if the video state is audio only, false otherwise.

public static boolean isBidirectional (int videoState)

Added in API level 23

Indicates whether the video state is bi-directional.

Parameters
videoState The video state.
Returns
  • True if the video is bi-directional, false otherwise.

public static boolean isPaused (int videoState)

Added in API level 23

Indicates whether the video state is paused.

Parameters
videoState The video state.
Returns
  • True if the video is paused, false otherwise.

public static boolean isReceptionEnabled (int videoState)

Added in API level 23

Indicates whether the video state has video reception enabled.

Parameters
videoState The video state.
Returns
  • True if video reception is enabled, false otherwise.

public static boolean isTransmissionEnabled (int videoState)

Added in API level 23

Indicates whether the video state has video transmission enabled.

Parameters
videoState The video state.
Returns
  • True if video transmission is enabled, false otherwise.

public static boolean isVideo (int videoState)

Added in API level 23

Indicates whether video transmission or reception is enabled for a video state.

Parameters
videoState The video state.
Returns
  • True if video transmission or reception is enabled, false otherwise.

public String toString ()

Added in API level 23

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public static String videoStateToString (int videoState)

Added in API level 23

Generates a string representation of a video state.

Parameters
videoState The video state.
Returns
  • String representation of the video state.

public void writeToParcel (Parcel dest, int flags)

Added in API level 23

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.