Skip to content

Most visited

Recently visited

navigation

VideoProfile

public class VideoProfile
extends Object implements Parcelable

java.lang.Object
   ↳ android.telecom.VideoProfile


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.

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 representation of the 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.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Constants

QUALITY_DEFAULT

added in API level 23
int QUALITY_DEFAULT

Use default video quality.

Constant Value: 4 (0x00000004)

QUALITY_HIGH

added in API level 23
int QUALITY_HIGH

"High" video quality.

Constant Value: 1 (0x00000001)

QUALITY_LOW

added in API level 23
int QUALITY_LOW

"Low" video quality.

Constant Value: 3 (0x00000003)

QUALITY_MEDIUM

added in API level 23
int QUALITY_MEDIUM

"Medium" video quality.

Constant Value: 2 (0x00000002)

STATE_AUDIO_ONLY

added in API level 23
int STATE_AUDIO_ONLY

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)

STATE_BIDIRECTIONAL

added in API level 23
int STATE_BIDIRECTIONAL

Video signal is bi-directional.

Constant Value: 3 (0x00000003)

STATE_PAUSED

added in API level 23
int STATE_PAUSED

Video is paused.

Constant Value: 4 (0x00000004)

STATE_RX_ENABLED

added in API level 23
int STATE_RX_ENABLED

Video reception is enabled.

Constant Value: 2 (0x00000002)

STATE_TX_ENABLED

added in API level 23
int STATE_TX_ENABLED

Video transmission is enabled.

Constant Value: 1 (0x00000001)

Fields

CREATOR

added in API level 23
Creator<VideoProfile> CREATOR

Responsible for creating VideoProfile objects from deserialized Parcels.

Public constructors

VideoProfile

added in API level 23
VideoProfile (int videoState)

Creates an instance of the VideoProfile

Parameters
videoState int: The video state.

VideoProfile

added in API level 23
VideoProfile (int videoState, 
                int quality)

Creates an instance of the VideoProfile

Parameters
videoState int: The video state.

quality int: The video quality.

Public methods

describeContents

added in API level 23
int describeContents ()

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

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

getQuality

added in API level 23
int getQuality ()

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

Returns
int

getVideoState

added in API level 23
int getVideoState ()

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

Returns
int

isAudioOnly

added in API level 23
boolean isAudioOnly (int videoState)

Indicates whether the video state is audio only.

Note: Considers only whether either both the STATE_RX_ENABLED or STATE_TX_ENABLED bits are off, but not STATE_PAUSED.

Parameters
videoState int: The video state.

Returns
boolean True if the video state is audio only, false otherwise.

isBidirectional

added in API level 23
boolean isBidirectional (int videoState)

Indicates whether the video state is bi-directional.

Parameters
videoState int: The video state.

Returns
boolean True if the video is bi-directional, false otherwise.

isPaused

added in API level 23
boolean isPaused (int videoState)

Indicates whether the video state is paused.

Parameters
videoState int: The video state.

Returns
boolean True if the video is paused, false otherwise.

isReceptionEnabled

added in API level 23
boolean isReceptionEnabled (int videoState)

Indicates whether the video state has video reception enabled.

Parameters
videoState int: The video state.

Returns
boolean True if video reception is enabled, false otherwise.

isTransmissionEnabled

added in API level 23
boolean isTransmissionEnabled (int videoState)

Indicates whether the video state has video transmission enabled.

Parameters
videoState int: The video state.

Returns
boolean True if video transmission is enabled, false otherwise.

isVideo

added in API level 23
boolean isVideo (int videoState)

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

Parameters
videoState int: The video state.

Returns
boolean True if video transmission or reception is enabled, false otherwise.

toString

added in API level 23
String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

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

Returns
String a string representation of the object.

videoStateToString

added in API level 23
String videoStateToString (int videoState)

Generates a string representation of a video state.

Parameters
videoState int: The video state.

Returns
String String representation of the video state.

writeToParcel

added in API level 23
void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.

flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)