Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

Genres

class Genres
kotlin.Any
   ↳ androidx.tvprovider.media.tv.TvContractCompat.Programs.Genres

Canonical genres for TV programs.

Summary

Constants
static String

The genre for Family/Kids.

static String

The genre for Sports.

static String

The genre for Shopping.

static String

The genre for Movies.

static String

The genre for Comedy.

static String

The genre for Travel.

static String

The genre for Drama.

static String

The genre for Education.

static String

The genre for Animal/Wildlife.

static String

The genre for News.

static String

The genre for Gaming.

static String

The genre for Arts.

static String

The genre for Entertainment.

static String

The genre for Life Style.

static String

The genre for Music.

static String

The genre for Premier.

static String

The genre for Tech/Science.

Public methods
static String!
encode(@NonNull vararg genres: String!)

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

static Array<String!>!
decode(@NonNull genres: String)

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

static Boolean

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

Constants

FAMILY_KIDS

static val FAMILY_KIDS: String

The genre for Family/Kids.

Value: "FAMILY_KIDS"

SPORTS

static val SPORTS: String

The genre for Sports.

Value: "SPORTS"

SHOPPING

static val SHOPPING: String

The genre for Shopping.

Value: "SHOPPING"

MOVIES

static val MOVIES: String

The genre for Movies.

Value: "MOVIES"

COMEDY

static val COMEDY: String

The genre for Comedy.

Value: "COMEDY"

TRAVEL

static val TRAVEL: String

The genre for Travel.

Value: "TRAVEL"

DRAMA

static val DRAMA: String

The genre for Drama.

Value: "DRAMA"

EDUCATION

static val EDUCATION: String

The genre for Education.

Value: "EDUCATION"

ANIMAL_WILDLIFE

static val ANIMAL_WILDLIFE: String

The genre for Animal/Wildlife.

Value: "ANIMAL_WILDLIFE"

NEWS

static val NEWS: String

The genre for News.

Value: "NEWS"

GAMING

static val GAMING: String

The genre for Gaming.

Value: "GAMING"

ARTS

static val ARTS: String

The genre for Arts.

Value: "ARTS"

ENTERTAINMENT

static val ENTERTAINMENT: String

The genre for Entertainment.

Value: "ENTERTAINMENT"

LIFE_STYLE

static val LIFE_STYLE: String

The genre for Life Style.

Value: "LIFE_STYLE"

MUSIC

static val MUSIC: String

The genre for Music.

Value: "MUSIC"

PREMIER

static val PREMIER: String

The genre for Premier.

Value: "PREMIER"

TECH_SCIENCE

static val TECH_SCIENCE: String

The genre for Tech/Science.

Value: "TECH_SCIENCE"

Public methods

encode

static fun encode(@NonNull vararg genres: String!): String!

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

Parameters
genres String!: Genre strings.
Return
String!: an encoded genre string that can be inserted into the COLUMN_BROADCAST_GENRE or COLUMN_CANONICAL_GENRE column.

decode

static fun decode(@NonNull genres: String): Array<String!>!

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

Parameters
genres String: The encoded genre string retrieved from the COLUMN_BROADCAST_GENRE or COLUMN_CANONICAL_GENRE column.
Return
Array<String!>!: genre strings.

isCanonical

static fun isCanonical(genre: String!): Boolean

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

Parameters
genre String!: The name of genre to be checked.
Return
Boolean: true if the genre is canonical, otherwise false.