belongs to Maven artifact androidx.tvprovider:tvprovider:1.0.0-alpha1

TvContractCompat.Programs.Genres

public static final class TvContractCompat.Programs.Genres
extends Object

java.lang.Object
   ↳ androidx.tvprovider.media.tv.TvContractCompat.Programs.Genres


Canonical genres for TV programs.

Summary

Constants

String ANIMAL_WILDLIFE

The genre for Animal/Wildlife.

String ARTS

The genre for Arts.

String COMEDY

The genre for Comedy.

String DRAMA

The genre for Drama.

String EDUCATION

The genre for Education.

String ENTERTAINMENT

The genre for Entertainment.

String FAMILY_KIDS

The genre for Family/Kids.

String GAMING

The genre for Gaming.

String LIFE_STYLE

The genre for Life Style.

String MOVIES

The genre for Movies.

String MUSIC

The genre for Music.

String NEWS

The genre for News.

String PREMIER

The genre for Premier.

String SHOPPING

The genre for Shopping.

String SPORTS

The genre for Sports.

String TECH_SCIENCE

The genre for Tech/Science.

String TRAVEL

The genre for Travel.

Public methods

static String[] decode(String genres)

Decodes the genre strings from the text stored in the database.

static String encode(String... genres)

Encodes genre strings to a text that can be put into the database.

static boolean isCanonical(String genre)

Returns whether a given text is a canonical genre defined in TvContractCompat.Programs.Genres.

Inherited methods

Constants

ANIMAL_WILDLIFE

String ANIMAL_WILDLIFE

The genre for Animal/Wildlife.

Constant Value: "ANIMAL_WILDLIFE"

ARTS

String ARTS

The genre for Arts.

Constant Value: "ARTS"

COMEDY

String COMEDY

The genre for Comedy.

Constant Value: "COMEDY"

DRAMA

String DRAMA

The genre for Drama.

Constant Value: "DRAMA"

EDUCATION

String EDUCATION

The genre for Education.

Constant Value: "EDUCATION"

ENTERTAINMENT

String ENTERTAINMENT

The genre for Entertainment.

Constant Value: "ENTERTAINMENT"

FAMILY_KIDS

String FAMILY_KIDS

The genre for Family/Kids.

Constant Value: "FAMILY_KIDS"

GAMING

String GAMING

The genre for Gaming.

Constant Value: "GAMING"

LIFE_STYLE

String LIFE_STYLE

The genre for Life Style.

Constant Value: "LIFE_STYLE"

MOVIES

String MOVIES

The genre for Movies.

Constant Value: "MOVIES"

MUSIC

String MUSIC

The genre for Music.

Constant Value: "MUSIC"

NEWS

String NEWS

The genre for News.

Constant Value: "NEWS"

PREMIER

String PREMIER

The genre for Premier.

Constant Value: "PREMIER"

SHOPPING

String SHOPPING

The genre for Shopping.

Constant Value: "SHOPPING"

SPORTS

String SPORTS

The genre for Sports.

Constant Value: "SPORTS"

TECH_SCIENCE

String TECH_SCIENCE

The genre for Tech/Science.

Constant Value: "TECH_SCIENCE"

TRAVEL

String TRAVEL

The genre for Travel.

Constant Value: "TRAVEL"

Public methods

decode

String[] decode (String genres)

Decodes the genre strings from the text stored in the database.

Parameters
genres String: The encoded genre string retrieved from the TvContractCompat.Programs.COLUMN_BROADCAST_GENRE or TvContractCompat.Programs.COLUMN_CANONICAL_GENRE column.

Returns
String[] genre strings.

encode

String encode (String... genres)

Encodes genre strings to a text that can be put into the database.

Parameters
genres String: Genre strings.

Returns
String an encoded genre string that can be inserted into the TvContractCompat.Programs.COLUMN_BROADCAST_GENRE or TvContractCompat.Programs.COLUMN_CANONICAL_GENRE column.

isCanonical

boolean isCanonical (String genre)

Returns whether a given text is a canonical genre defined in TvContractCompat.Programs.Genres.

Parameters
genre String: The name of genre to be checked.

Returns
boolean true if the genre is canonical, otherwise false.