Channel 
This package is part of the
Android support library  which
is no longer maintained.
The support library has been superseded by AndroidX 
which is part of Jetpack .
We recommend using the AndroidX libraries in all new projects. You should also consider
migrating  existing projects to AndroidX.
To find the AndroidX class that maps to this deprecated class, see the AndroidX
support library class
mappings . 
 
  public
  
  final
  
  class
  Channel
 
  
    extends Object
  
  
  
  
  
  
  
    
    java.lang.Object
     
   
  
  
    
         ↳ 
    
    android.support.media.tv.Channel
     
   
  
  
    
 
  A convenience class to access TvContractCompat.Channels  entries in the system content
 provider.
 
This class makes it easy to insert or retrieve a channel from the system content provider,
 which is defined in TvContractCompat .
 
Usage example when inserting a channel:
 
 Channel channel = new Channel.Builder()
         .setDisplayName("Channel Name")
         .setDescription("Channel description")
         .setType(Channels.TYPE_PREVIEW)
         // Set more attributes...
         .build();
 Uri channelUri = getContentResolver().insert(Channels.CONTENT_URI, channel.toContentValues());
   
 Usage example when retrieving a channel:
 
 Channel channel;
 try (Cursor cursor = resolver.query(channelUri, null, null, null, null)) {
     if (cursor != null && cursor.getCount() != 0) {
         cursor.moveToNext();
         channel = Channel.fromCursor(cursor);
     }
 }
   
 Usage example when updating an existing channel:
 
 Channel updatedChannel = new Channel.Builder(channel)
         .setDescription("New channel description")
         .build();
 getContentResolver().update(TvContractCompat.buildChannelUri(updatedChannel.getId()),
         updatedChannel.toContentValues(), null, null);
   
 Usage example when deleting a channel:
 
 getContentResolver().delete(
         TvContractCompat.buildChannelUri(existingChannel.getId()), null, null);
   
Summary 
Nested classes  
  
    
      
        
        
        
        
        class 
      
        Channel.Builder 
        The builder class that makes it easy to chain setters to create a Channel  object. 
        
    
       
     
    
    
Inherited methods  
  
     
   From
class
  
    java.lang.Object
  
  
  
  
    
      
  
  
  
  
    
        
        
        
        
        
        Object
     
  
    
      
      clone()
      
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        boolean
     
  
    
      
      equals(Object arg0)
      
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        void
     
  
    
      
      finalize()
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        Class<?>
     
  
    
      
      getClass()
      
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        int
     
  
    
      
      hashCode()
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        void
     
  
    
      
      notify()
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        void
     
  
    
      
      notifyAll()
      
      
     
   
  
  
  
  
  
    
        
        
        
        
        
        String
     
  
    
      
      toString()
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        void
     
  
    
      
      wait(long arg0, int arg1)
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        void
     
  
    
      
      wait(long arg0)
      
      
     
   
  
  
  
  
  
    
        
        
        
        final
        
        void
     
  
    
      
      wait()
      
      
     
   
  
    
   
 
  
Public methods 
 
    equals 
    
boolean equals (Object other)  
    
    
    
  
    
    
 
 
    fromCursor 
    
Channel  fromCursor (Cursor  cursor)  
    
    
    
  Creates a Channel object from a cursor including the fields defined in TvContractCompat.Channels .
    
    Parameters  
      
        cursor 
        
          Cursor: A row from the TV Input Framework database. 
       
    
    
      Returns  
      
        Channel  
        A channel with the values taken from the cursor.
 
       
    
 
 
    getAppLinkColor 
    
int getAppLinkColor ()  
    
    
    
  
    
 
 
    getAppLinkIconUri 
    
Uri  getAppLinkIconUri ()  
    
    
    
  
    
 
 
    getAppLinkIntent 
    
Intent  getAppLinkIntent ()  
    
    
    
  
    
      
      Throws  
        
          URISyntaxException 
           
         
      
  
 
 
    getAppLinkIntentUri 
    
Uri  getAppLinkIntentUri ()  
    
    
    
  
    
 
 
    getAppLinkPosterArtUri 
    
Uri  getAppLinkPosterArtUri ()  
    
    
    
  
    
 
 
    getAppLinkText 
    
String getAppLinkText ()  
    
    
    
  
    
 
 
    getConfigurationDisplayOrder 
    
int getConfigurationDisplayOrder ()  
    
    
    
  
    
 
 
    getDescription 
    
String getDescription ()  
    
    
    
  
    
 
 
    getDisplayName 
    
String getDisplayName ()  
    
    
    
  
    
 
 
    getDisplayNumber 
    
String getDisplayNumber ()  
    
    
    
  
    
 
 
    getId 
    
long getId ()  
    
    
    
  
    
      Returns  
      
        long 
        The value of _ID  for the channel.
 
       
    
 
 
 
    getInternalProviderDataByteArray 
    
byte[] getInternalProviderDataByteArray ()  
    
    
    
  
    
 
 
    getInternalProviderFlag1 
    
Long getInternalProviderFlag1 ()  
    
    
    
  
    
 
 
    getInternalProviderFlag2 
    
Long getInternalProviderFlag2 ()  
    
    
    
  
    
 
 
    getInternalProviderFlag3 
    
Long getInternalProviderFlag3 ()  
    
    
    
  
    
 
 
    getInternalProviderFlag4 
    
Long getInternalProviderFlag4 ()  
    
    
    
  
    
 
 
    getInternalProviderId 
    
String getInternalProviderId ()  
    
    
    
  
    
 
 
    getNetworkAffiliation 
    
String getNetworkAffiliation ()  
    
    
    
  
    
 
 
    getOriginalNetworkId 
    
int getOriginalNetworkId ()  
    
    
    
  
    
 
 
    getPackageName 
    
String getPackageName ()  
    
    
    
  
    
 
 
    getServiceId 
    
int getServiceId ()  
    
    
    
  
    
 
 
    getServiceType 
    
String getServiceType ()  
    
    
    
  
    
 
 
    getSystemChannelKey 
    
String getSystemChannelKey ()  
    
    
    
  
    
 
 
    getTransportStreamId 
    
int getTransportStreamId ()  
    
    
    
  
    
 
 
    getType 
    
String getType ()  
    
    
    
  
    
      Returns  
      
        String 
        The value of COLUMN_TYPE  for the channel.
 
       
    
 
 
 
 
    isBrowsable 
    
boolean isBrowsable ()  
    
    
    
  
    
 
 
    isLocked 
    
boolean isLocked ()  
    
    
    
  
    
 
 
    isSearchable 
    
boolean isSearchable ()  
    
    
    
  
    
 
 
    isTransient 
    
boolean isTransient ()  
    
    
    
  
    
 
 
    toContentValues 
    
ContentValues  toContentValues ()  
    
    
    
  
    
      Returns  
      
        ContentValues  
        The fields of the Channel in the ContentValues format to be easily inserted into the
 TV Input Framework database.
 
       
    
 
 
    toString 
    
String toString ()  
    
    
    
  
    
 
  
  
     
  
  
    
      
       
    
    
      
    
     
  
       
    
    
       
    
  
  
  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.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]