TvContractCompat.Programs.Genres


public final class TvContractCompat.Programs.Genres


Canonical genres for TV programs.

Summary

Constants

static final String
ANIMAL_WILDLIFE = "ANIMAL_WILDLIFE"

The genre for Animal/Wildlife.

static final String
ARTS = "ARTS"

The genre for Arts.

static final String
COMEDY = "COMEDY"

The genre for Comedy.

static final String
DRAMA = "DRAMA"

The genre for Drama.

static final String
EDUCATION = "EDUCATION"

The genre for Education.

static final String
ENTERTAINMENT = "ENTERTAINMENT"

The genre for Entertainment.

static final String
FAMILY_KIDS = "FAMILY_KIDS"

The genre for Family/Kids.

static final String
GAMING = "GAMING"

The genre for Gaming.

static final String
LIFE_STYLE = "LIFE_STYLE"

The genre for Life Style.

static final String
MOVIES = "MOVIES"

The genre for Movies.

static final String
MUSIC = "MUSIC"

The genre for Music.

static final String
NEWS = "NEWS"

The genre for News.

static final String
PREMIER = "PREMIER"

The genre for Premier.

static final String
SHOPPING = "SHOPPING"

The genre for Shopping.

static final String
SPORTS = "SPORTS"

The genre for Sports.

static final String
TECH_SCIENCE = "TECH_SCIENCE"

The genre for Tech/Science.

static final String
TRAVEL = "TRAVEL"

The genre for Travel.

Public methods

static String[]

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

static String
encode(@NonNull String[] genres)

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

static boolean

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

Constants

ANIMAL_WILDLIFE

Added in 1.1.0-alpha02
public static final String ANIMAL_WILDLIFE = "ANIMAL_WILDLIFE"

The genre for Animal/Wildlife.

ARTS

Added in 1.1.0-alpha02
public static final String ARTS = "ARTS"

The genre for Arts.

COMEDY

Added in 1.1.0-alpha02
public static final String COMEDY = "COMEDY"

The genre for Comedy.

DRAMA

Added in 1.1.0-alpha02
public static final String DRAMA = "DRAMA"

The genre for Drama.

EDUCATION

Added in 1.1.0-alpha02
public static final String EDUCATION = "EDUCATION"

The genre for Education.

ENTERTAINMENT

Added in 1.1.0-alpha02
public static final String ENTERTAINMENT = "ENTERTAINMENT"

The genre for Entertainment.

FAMILY_KIDS

Added in 1.1.0-alpha02
public static final String FAMILY_KIDS = "FAMILY_KIDS"

The genre for Family/Kids.

GAMING

Added in 1.1.0-alpha02
public static final String GAMING = "GAMING"

The genre for Gaming.

LIFE_STYLE

Added in 1.1.0-alpha02
public static final String LIFE_STYLE = "LIFE_STYLE"

The genre for Life Style.

MOVIES

Added in 1.1.0-alpha02
public static final String MOVIES = "MOVIES"

The genre for Movies.

MUSIC

Added in 1.1.0-alpha02
public static final String MUSIC = "MUSIC"

The genre for Music.

NEWS

Added in 1.1.0-alpha02
public static final String NEWS = "NEWS"

The genre for News.

PREMIER

Added in 1.1.0-alpha02
public static final String PREMIER = "PREMIER"

The genre for Premier.

SHOPPING

Added in 1.1.0-alpha02
public static final String SHOPPING = "SHOPPING"

The genre for Shopping.

SPORTS

Added in 1.1.0-alpha02
public static final String SPORTS = "SPORTS"

The genre for Sports.

TECH_SCIENCE

Added in 1.1.0-alpha02
public static final String TECH_SCIENCE = "TECH_SCIENCE"

The genre for Tech/Science.

TRAVEL

Added in 1.1.0-alpha02
public static final String TRAVEL = "TRAVEL"

The genre for Travel.

Public methods

decode

Added in 1.1.0-alpha02
public static String[] decode(@NonNull String genres)

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

Parameters
@NonNull String genres

The encoded genre string retrieved from the COLUMN_BROADCAST_GENRE or COLUMN_CANONICAL_GENRE column.

Returns
String[]

genre strings.

encode

public static String encode(@NonNull String[] genres)

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

Parameters
@NonNull String[] genres

Genre strings.

Returns
String

an encoded genre string that can be inserted into the COLUMN_BROADCAST_GENRE or COLUMN_CANONICAL_GENRE column.

isCanonical

Added in 1.1.0-alpha02
public static boolean isCanonical(String genre)

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

Parameters
String genre

The name of genre to be checked.

Returns
boolean

true if the genre is canonical, otherwise false.