VideoProfile
  public
  
  
  
  class
  VideoProfile
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.telecom.VideoProfile | 
Represents attributes of video calls.
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | VideoProfile.CameraCapabilitiesRepresents the camera capabilities important to a Video Telephony provider. | 
| Constants | |
|---|---|
| int | QUALITY_DEFAULTUse default video quality. | 
| int | QUALITY_HIGH"High" video quality. | 
| int | QUALITY_LOW"Low" video quality. | 
| int | QUALITY_MEDIUM"Medium" video quality. | 
| int | STATE_AUDIO_ONLYUsed when answering or dialing a call to indicate that the call does not have a video component. | 
| int | STATE_BIDIRECTIONALVideo signal is bi-directional. | 
| int | STATE_PAUSEDVideo is paused. | 
| int | STATE_RX_ENABLEDVideo reception is enabled. | 
| int | STATE_TX_ENABLEDVideo transmission is enabled. | 
| Inherited constants | 
|---|
| Fields | |
|---|---|
| 
    public
    static
    final
    Creator<VideoProfile> | CREATORResponsible 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 | |
|---|---|
Constants
QUALITY_DEFAULT
public static final int QUALITY_DEFAULT
Use default video quality.
Constant Value: 4 (0x00000004)
QUALITY_HIGH
public static final int QUALITY_HIGH
"High" video quality.
Constant Value: 1 (0x00000001)
QUALITY_LOW
public static final int QUALITY_LOW
"Low" video quality.
Constant Value: 3 (0x00000003)
QUALITY_MEDIUM
public static final int QUALITY_MEDIUM
"Medium" video quality.
Constant Value: 2 (0x00000002)
STATE_AUDIO_ONLY
public static final 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 VideoProfile.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
public static final int STATE_BIDIRECTIONAL
Video signal is bi-directional.
Constant Value: 3 (0x00000003)
STATE_PAUSED
public static final int STATE_PAUSED
Video is paused.
Constant Value: 4 (0x00000004)
STATE_RX_ENABLED
public static final int STATE_RX_ENABLED
Video reception is enabled.
Constant Value: 2 (0x00000002)
STATE_TX_ENABLED
public static final int STATE_TX_ENABLED
Video transmission is enabled.
Constant Value: 1 (0x00000001)
Fields
CREATOR
public static final Creator<VideoProfile> CREATOR
Responsible for creating VideoProfile objects from deserialized Parcels.
Public constructors
VideoProfile
public VideoProfile (int videoState)
Creates an instance of the VideoProfile
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
VideoProfile
public VideoProfile (int videoState, 
                int quality)Creates an instance of the VideoProfile
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| quality | int: The video quality.
 Value is android.telecom.VideoProfile.QUALITY_UNKNOWN,QUALITY_HIGH,QUALITY_MEDIUM,QUALITY_LOW, orQUALITY_DEFAULT | 
Public methods
describeContents
public 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
public int getQuality ()
The desired video quality for the call.
 Valid values: VideoProfile.QUALITY_HIGH, VideoProfile.QUALITY_MEDIUM,
 VideoProfile.QUALITY_LOW, VideoProfile.QUALITY_DEFAULT.
| Returns | |
|---|---|
| int | Value is android.telecom.VideoProfile.QUALITY_UNKNOWN, QUALITY_HIGH,QUALITY_MEDIUM,QUALITY_LOW, orQUALITY_DEFAULT | 
getVideoState
public int getVideoState ()
The video state of the call.
 Valid values: VideoProfile.STATE_AUDIO_ONLY,
 VideoProfile.STATE_BIDIRECTIONAL,
 VideoProfile.STATE_TX_ENABLED,
 VideoProfile.STATE_RX_ENABLED,
 VideoProfile.STATE_PAUSED.
| Returns | |
|---|---|
| int | Value is either 0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
isAudioOnly
public static 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.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif the video state is audio only,falseotherwise. | 
isBidirectional
public static boolean isBidirectional (int videoState)
Indicates whether the video state is bi-directional.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif the video is bi-directional,falseotherwise. | 
isPaused
public static boolean isPaused (int videoState)
Indicates whether the video state is paused.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif the video is paused,falseotherwise. | 
isReceptionEnabled
public static boolean isReceptionEnabled (int videoState)
Indicates whether the video state has video reception enabled.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif video reception is enabled,falseotherwise. | 
isTransmissionEnabled
public static boolean isTransmissionEnabled (int videoState)
Indicates whether the video state has video transmission enabled.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif video transmission is enabled,falseotherwise. | 
isVideo
public static boolean isVideo (int videoState)
Indicates whether video transmission or reception is enabled for a video state.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| boolean | Trueif video transmission or reception is enabled,falseotherwise. | 
toString
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
| String | a string representation of the object. | 
videoStateToString
public static String videoStateToString (int videoState)
Generates a string representation of a video state.
| Parameters | |
|---|---|
| videoState | int: The video state.
 Value is either0or a combination ofSTATE_AUDIO_ONLY,STATE_TX_ENABLED,STATE_RX_ENABLED,STATE_BIDIRECTIONAL, andSTATE_PAUSED | 
| Returns | |
|---|---|
| String | String representation of the video state. | 
writeToParcel
public 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 orParcelable.PARCELABLE_WRITE_RETURN_VALUE. | 
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.
