Genres

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

Canonical genres for TV programs.

Summary

Constants

static String

The genre for Animal/Wildlife.

static String

The genre for Arts.

static String

The genre for Comedy.

static String

The genre for Drama.

static String

The genre for Education.

static String

The genre for Entertainment.

static String

The genre for Family/Kids.

static String

The genre for Gaming.

static String

The genre for Life Style.

static String

The genre for Movies.

static String

The genre for Music.

static String

The genre for News.

static String

The genre for Premier.

static String

The genre for Shopping.

static String

The genre for Sports.

static String

The genre for Tech/Science.

static String

The genre for Travel.

Public methods

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

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

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

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

static val ANIMAL_WILDLIFE: String

The genre for Animal/Wildlife.

Value: "ANIMAL_WILDLIFE"

ARTS

static val ARTS: String

The genre for Arts.

Value: "ARTS"

COMEDY

static val COMEDY: String

The genre for Comedy.

Value: "COMEDY"

DRAMA

static val DRAMA: String

The genre for Drama.

Value: "DRAMA"

EDUCATION

static val EDUCATION: String

The genre for Education.

Value: "EDUCATION"

ENTERTAINMENT

static val ENTERTAINMENT: String

The genre for Entertainment.

Value: "ENTERTAINMENT"

FAMILY_KIDS

static val FAMILY_KIDS: String

The genre for Family/Kids.

Value: "FAMILY_KIDS"

GAMING

static val GAMING: String

The genre for Gaming.

Value: "GAMING"

LIFE_STYLE

static val LIFE_STYLE: String

The genre for Life Style.

Value: "LIFE_STYLE"

MOVIES

static val MOVIES: String

The genre for Movies.

Value: "MOVIES"

MUSIC

static val MUSIC: String

The genre for Music.

Value: "MUSIC"

NEWS

static val NEWS: String

The genre for News.

Value: "NEWS"

PREMIER

static val PREMIER: String

The genre for Premier.

Value: "PREMIER"

SHOPPING

static val SHOPPING: String

The genre for Shopping.

Value: "SHOPPING"

SPORTS

static val SPORTS: String

The genre for Sports.

Value: "SPORTS"

TECH_SCIENCE

static val TECH_SCIENCE: String

The genre for Tech/Science.

Value: "TECH_SCIENCE"

TRAVEL

static val TRAVEL: String

The genre for Travel.

Value: "TRAVEL"

Public methods

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.

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.

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.