Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

TvContract.Programs.Genres

public static final class TvContract.Programs.Genres
extends Object

java.lang.Object
   ↳ android.media.tv.TvContract.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 TvContract.Programs.Genres.

Inherited methods

Constants

ANIMAL_WILDLIFE

added in API level 21
public static final String ANIMAL_WILDLIFE

The genre for Animal/Wildlife.

Constant Value: "ANIMAL_WILDLIFE"

ARTS

added in API level 22
public static final String ARTS

The genre for Arts.

Constant Value: "ARTS"

COMEDY

added in API level 21
public static final String COMEDY

The genre for Comedy.

Constant Value: "COMEDY"

DRAMA

added in API level 21
public static final String DRAMA

The genre for Drama.

Constant Value: "DRAMA"

EDUCATION

added in API level 21
public static final String EDUCATION

The genre for Education.

Constant Value: "EDUCATION"

ENTERTAINMENT

added in API level 22
public static final String ENTERTAINMENT

The genre for Entertainment.

Constant Value: "ENTERTAINMENT"

FAMILY_KIDS

added in API level 21
public static final String FAMILY_KIDS

The genre for Family/Kids.

Constant Value: "FAMILY_KIDS"

GAMING

added in API level 21
public static final String GAMING

The genre for Gaming.

Constant Value: "GAMING"

LIFE_STYLE

added in API level 22
public static final String LIFE_STYLE

The genre for Life Style.

Constant Value: "LIFE_STYLE"

MOVIES

added in API level 21
public static final String MOVIES

The genre for Movies.

Constant Value: "MOVIES"

MUSIC

added in API level 22
public static final String MUSIC

The genre for Music.

Constant Value: "MUSIC"

NEWS

added in API level 21
public static final String NEWS

The genre for News.

Constant Value: "NEWS"

PREMIER

added in API level 22
public static final String PREMIER

The genre for Premier.

Constant Value: "PREMIER"

SHOPPING

added in API level 21
public static final String SHOPPING

The genre for Shopping.

Constant Value: "SHOPPING"

SPORTS

added in API level 21
public static final String SPORTS

The genre for Sports.

Constant Value: "SPORTS"

TECH_SCIENCE

added in API level 22
public static final String TECH_SCIENCE

The genre for Tech/Science.

Constant Value: "TECH_SCIENCE"

TRAVEL

added in API level 21
public static final String TRAVEL

The genre for Travel.

Constant Value: "TRAVEL"

Public methods

decode

added in API level 21
public static 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 TvContract.Programs.COLUMN_BROADCAST_GENRE or TvContract.Programs.COLUMN_CANONICAL_GENRE column.

This value must never be null.

Returns
String[] genre strings.

encode

added in API level 21
public static String encode (String... genres)

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

Parameters
genres String: Genre strings.

This value must never be null.

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

isCanonical

added in API level 24
public static boolean isCanonical (String genre)

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

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

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