Program 
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
  Program
  
    extends Object
  
  
  
  
  
      implements
      
        Comparable<Program >
      
  
  
  
    
    java.lang.Object
     
   
  
  
    
         ↳ 
    
    android.support.media.tv.Program
     
   
  
  
    
A convenience class to access TvContractCompat.Programs 
This class makes it easy to insert or retrieve a program from the system content provider,
 which is defined in TvContractCompat 
Usage example when inserting a program:
 
 Program program = new Program.Builder()
         .setChannelId(channel.getId())
         .setTitle("Program Title")
         .setDescription("Program Description")
         .setPosterArtUri(Uri.parse("http://example.com/poster_art.png"))
         // Set more attributes...
         .build();
 Uri programUri = getContentResolver().insert(Programs.CONTENT_URI, program.toContentValues());
  Usage example when retrieving a program:
 
 Program program;
 try (Cursor cursor = resolver.query(programUri, null, null, null, null)) {
     if (cursor != null && cursor.getCount() != 0) {
         cursor.moveToNext();
         program = Program.fromCursor(cursor);
     }
 }
  Usage example when updating an existing program:
 
 Program updatedProgram = new Program.Builder(program)
         .setEndTimeUtcMillis(newProgramEndTime)
         .build();
 getContentResolver().update(TvContractCompat.buildProgramUri(updatedProgram.getId()),
         updatedProgram.toContentValues(), null, null);
  Usage example when deleting a program:
 
 getContentResolver().delete(TvContractCompat.buildProgramUri(existingProgram.getId()),
         null, null);
  Summary 
Nested classes 
      
        
        
        
        
        class
        Program.Builder This Builder class simplifies the creation of a Program 
       
     
    
    
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()
      
      
     
   
  
    
   
 
  
  
     From
interface
  
    java.lang.Comparable
  
  
  
  
    
      
  
  
  
  
    
        abstract
        
        
        
        
        int
    
      
      compareTo(Program  arg0)
      
      
     
   
  
    
   
 
  
Public methods 
    compareTo 
    
int compareTo (Program  other) 
    
    Parameters 
        other
          Program: The program you're comparing to. 
       
    
    
      Returns 
        intThe chronological order of the programs.
 
       
    
 
    equals 
    
boolean equals (Object other) 
    
    
 
    fromCursor 
    
Program  fromCursor (Cursor  cursor) Creates a Program object from a cursor including the fields defined in TvContractCompat.Programs 
    
    Parameters 
        cursor
          Cursor: A row from the TV Input Framework database. 
       
    
    
      Returns 
        Program A Program with the values taken from the cursor.
 
       
    
 
    getAudioLanguages 
    
String[] getAudioLanguages () 
    
      Returns 
        String[]The audio languages for the program. 
       
    
  
 
    getBroadcastGenres 
    
String[] getBroadcastGenres () 
    
 
    getCanonicalGenres 
    
String[] getCanonicalGenres () 
    
      Returns 
        String[]The canonical genre for the program. 
       
    
  
 
    getChannelId 
    
long getChannelId () 
    
 
    getDescription 
    
String getDescription () 
    
      Returns 
        StringThe short description for the program. 
       
    
  
 
    getEndTimeUtcMillis 
    
long getEndTimeUtcMillis () 
    
 
    getEpisodeNumber 
    
String getEpisodeNumber () 
    
      Returns 
        StringThe episode display number for the program. 
       
    
  
 
    getEpisodeTitle 
    
String getEpisodeTitle () 
    
      Returns 
        StringThe episode title for the program. 
       
    
  
 
    getId 
    
long getId () 
    
      Returns 
        longThe ID for the program. 
       
    
  
 
    getInternalProviderDataByteArray 
    
byte[] getInternalProviderDataByteArray () 
    
      Returns 
        byte[]The internal provider data for the program. 
       
    
  
 
    getInternalProviderFlag1 
    
Long getInternalProviderFlag1 () 
    
      Returns 
        LongThe first internal provider flag for the program. 
       
    
  
 
    getInternalProviderFlag2 
    
Long getInternalProviderFlag2 () 
    
      Returns 
        LongThe second internal provider flag for the program. 
       
    
  
 
    getInternalProviderFlag3 
    
Long getInternalProviderFlag3 () 
    
      Returns 
        LongThe third internal provider flag for the program. 
       
    
  
 
    getInternalProviderFlag4 
    
Long getInternalProviderFlag4 () 
    
      Returns 
        LongThe forth internal provider flag for the program. 
       
    
  
 
    getLongDescription 
    
String getLongDescription () 
    
      Returns 
        StringThe long description for the program. 
       
    
  
 
    getPosterArtUri 
    
Uri  getPosterArtUri () 
    
      Returns 
        Uri The poster art URI for the program. 
       
    
  
 
    getReviewRating 
    
String getReviewRating () 
    
      Returns 
        StringThe review rating for the program. 
       
    
  
 
    getReviewRatingStyle 
    
int getReviewRatingStyle () 
    
      Returns 
        intThe review rating style for the program. 
       
    
  
 
    getSeasonNumber 
    
String getSeasonNumber () 
    
      Returns 
        StringThe season display number for the program. 
       
    
  
 
    getSeasonTitle 
    
String getSeasonTitle () 
    
      Returns 
        StringThe season title for the program. 
       
    
  
 
    getStartTimeUtcMillis 
    
long getStartTimeUtcMillis () 
    
 
    getThumbnailUri 
    
Uri  getThumbnailUri () 
    
      Returns 
        Uri The thumbnail URI for the program. 
       
    
  
 
    getTitle 
    
String getTitle () 
    
      Returns 
        StringThe title for the program. 
       
    
  
 
    getVideoHeight 
    
int getVideoHeight () 
    
      Returns 
        intThe video height for the program. 
       
    
  
 
    getVideoWidth 
    
int getVideoWidth () 
    
      Returns 
        intThe video width for the program. 
       
    
  
 
    isRecordingProhibited 
    
boolean isRecordingProhibited () 
    
 
    isSearchable 
    
boolean isSearchable () 
    
      Returns 
        booleanWhether the program is searchable or not. 
       
    
  
 
    toContentValues 
    
ContentValues  toContentValues () 
    
      Returns 
        ContentValues The fields of the Program 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.
 
 
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]