WatchNextProgram 
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
  WatchNextProgram
  
    extends Object
  
  
  
  
  
  
  
    
    java.lang.Object
     
   
  
  
    
         ↳ 
    
    android.support.media.tv.WatchNextProgram
     
   
  
  
    
A convenience class to access TvContractCompat.WatchNextPrograms 
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 "watch next" program:
 
 WatchNextProgram watchNextProgram = new WatchNextProgram.Builder()
         .setWatchNextType(WatchNextPrograms.WATCH_NEXT_TYPE_CONTINUE)
         .setType(PreviewPrograms.TYPE_MOVIE)
         .setTitle("Program Title")
         .setDescription("Program Description")
         .setPosterArtUri(Uri.parse("http://example.com/poster_art.png"))
         // Set more attributes...
         .build();
 Uri watchNextProgramUri = getContentResolver().insert(WatchNextPrograms.CONTENT_URI,
         watchNextProgram.toContentValues());
  Usage example when retrieving a "watch next" program:
 
 WatchNextProgram watchNextProgram;
 try (Cursor cursor = resolver.query(watchNextProgramUri, null, null, null, null)) {
     if (cursor != null && cursor.getCount() != 0) {
         cursor.moveToNext();
         watchNextProgram = WatchNextProgram.fromCursor(cursor);
     }
 }
  Usage example when updating an existing "watch next" program:
 
 WatchNextProgram updatedProgram = new WatchNextProgram.Builder(watchNextProgram)
         .setLastEngagementTimeUtcMillis(System.currentTimeMillis())
         .build();
 getContentResolver().update(TvContractCompat.buildWatchNextProgramUri(updatedProgram.getId()),
         updatedProgram.toContentValues(), null, null);
  Usage example when deleting a "watch next" program:
 
 getContentResolver().delete(TvContractCompat.buildWatchNextProgramUri(existingProgram.getId()),
         null, null);
  Summary 
Nested classes 
      
        
        
        
        
        class
        WatchNextProgram.Builder This Builder class simplifies the creation of a WatchNextProgram 
       
     
    
    
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()
      
      
     
   
  
    
   
 
  
Constants 
    WATCH_NEXT_TYPE_UNKNOWN 
    
int WATCH_NEXT_TYPE_UNKNOWN The unknown watch next type. Use this type when the actual type is not known.
    
      Constant Value:
      
          -1
          (0xffffffff)
      
    
 
Public methods 
    equals 
    
boolean equals (Object other) 
    
    
 
    getAudioLanguages 
    
String[] getAudioLanguages () 
    
      Returns 
        String[]The audio languages for the program. 
       
    
  
 
    getAuthor 
    
String getAuthor () 
    
      Returns 
        StringThe author for the program. 
       
    
  
 
    getAvailability 
    
int getAvailability () 
    
      Returns 
        intThe availability of the program. 
       
    
  
 
    getCanonicalGenres 
    
String[] getCanonicalGenres () 
    
      Returns 
        String[]The canonical genre for the program. 
       
    
  
 
    getContentId 
    
String getContentId () 
    
      Returns 
        StringThe content ID for the program. 
       
    
  
 
    getDescription 
    
String getDescription () 
    
      Returns 
        StringThe short description for the program. 
       
    
  
 
    getDurationMillis 
    
int getDurationMillis () 
    
      Returns 
        intThe duration of the program in millis. 
       
    
  
 
    getEndTimeUtcMillis 
    
long getEndTimeUtcMillis () 
    
      Returns 
        longThe end time for the program. 
       
    
  
 
    getEpisodeNumber 
    
String getEpisodeNumber () 
    
      Returns 
        StringThe episode display number for the program. 
       
    
  
 
    getEpisodeTitle 
    
String getEpisodeTitle () 
    
      Returns 
        StringThe episode title for the program. 
       
    
  
 
    getGenre 
    
String getGenre () 
    
      Returns 
        StringThe genre for the program. 
       
    
  
 
    getId 
    
long getId () 
    
      Returns 
        longThe ID for the program. 
       
    
  
 
    getIntent 
    
Intent  getIntent () 
    
      Returns 
        Intent The intent which is launched when the program is selected. 
       
    
      
      Throws 
          URISyntaxException 
      
  
  
 
    getIntentUri 
    
Uri  getIntentUri () 
    
      Returns 
        Uri The intent URI which is launched when the program is selected. 
       
    
  
 
    getInteractionCount 
    
long getInteractionCount () 
    
      Returns 
        longThe interaction count for the program. 
       
    
  
 
    getInteractionType 
    
int getInteractionType () 
    
      Returns 
        intThe interaction type 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. 
       
    
  
 
    getInternalProviderId 
    
String getInternalProviderId () 
    
      Returns 
        StringThe internal provider ID for the program. 
       
    
  
 
    getItemCount 
    
int getItemCount () 
    
      Returns 
        intThe item count for the program. 
       
    
  
 
    getLastEngagementTimeUtcMillis 
    
long getLastEngagementTimeUtcMillis () 
    
 
    getLastPlaybackPositionMillis 
    
int getLastPlaybackPositionMillis () 
    
      Returns 
        intThe last playback position of the program in millis. 
       
    
  
 
    getLogoContentDescription 
    
String getLogoContentDescription () 
    
      Returns 
        StringThe logo content description for the program. 
       
    
  
 
    getLogoUri 
    
Uri  getLogoUri () 
    
      Returns 
        Uri The logo URI for the program. 
       
    
  
 
    getLongDescription 
    
String getLongDescription () 
    
      Returns 
        StringThe long description for the program. 
       
    
  
 
    getOfferPrice 
    
String getOfferPrice () 
    
      Returns 
        StringThe offer price of the program. 
       
    
  
 
    getPosterArtAspectRatio 
    
int getPosterArtAspectRatio () 
    
      Returns 
        intThe poster art aspect ratio for the program. 
       
    
  
 
    getPosterArtUri 
    
Uri  getPosterArtUri () 
    
      Returns 
        Uri The poster art URI for the program. 
       
    
  
 
    getPreviewAudioUri 
    
Uri  getPreviewAudioUri () 
    
      Returns 
        Uri The preview audio URI for the program. 
       
    
  
 
    getPreviewVideoUri 
    
Uri  getPreviewVideoUri () 
    
      Returns 
        Uri The preview video URI for the program. 
       
    
  
 
    getReleaseDate 
    
String getReleaseDate () 
    
      Returns 
        StringThe release date of 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 () 
    
      Returns 
        longThe start time for the program. 
       
    
  
 
    getStartingPrice 
    
String getStartingPrice () 
    
      Returns 
        StringThe starting price of the program. 
       
    
  
 
    getThumbnailAspectRatio 
    
int getThumbnailAspectRatio () 
    
      Returns 
        intThe thumbnail aspect ratio for the program. 
       
    
  
 
    getThumbnailUri 
    
Uri  getThumbnailUri () 
    
      Returns 
        Uri The thumbnail URI for the program. 
       
    
  
 
    getTitle 
    
String getTitle () 
    
      Returns 
        StringThe title for the program. 
       
    
  
 
    getType 
    
int getType () 
    
      Returns 
        intThe type of the program. 
       
    
  
 
    getVideoHeight 
    
int getVideoHeight () 
    
      Returns 
        intThe video height for the program. 
       
    
  
 
    getVideoWidth 
    
int getVideoWidth () 
    
      Returns 
        intThe video width for the program. 
       
    
  
 
    getWatchNextType 
    
int getWatchNextType () 
    
 
    isBrowsable 
    
boolean isBrowsable () 
    
      Returns 
        booleanWhether the program is browsable or not. 
       
    
  
 
    isLive 
    
boolean isLive () 
    
      Returns 
        booleanWhether the program is live or not. 
       
    
  
 
    isSearchable 
    
boolean isSearchable () 
    
      Returns 
        booleanWhether the program is searchable or not. 
       
    
  
 
    isTransient 
    
boolean isTransient () 
    
      Returns 
        booleanWhether the program is transient 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."],[],[]]