Genres
class Genres
| kotlin.Any | |
| ↳ | android.media.tv.TvContract.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!>! |
Decodes the genre strings from the text stored in the database. |
| static String! |
Encodes genre strings to a text that can be put into the database. |
| static Boolean |
isCanonical(genre: String!)Returns whether a given text is a canonical genre defined in |
Constants
ANIMAL_WILDLIFE
static val ANIMAL_WILDLIFE: String
The genre for Animal/Wildlife.
Value: "ANIMAL_WILDLIFE"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"LIFE_STYLE
static val LIFE_STYLE: String
The genre for Life Style.
Value: "LIFE_STYLE"SHOPPING
static val SHOPPING: String
The genre for Shopping.
Value: "SHOPPING"TECH_SCIENCE
static val TECH_SCIENCE: String
The genre for Tech/Science.
Value: "TECH_SCIENCE"Public methods
decode
static fun decode(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. This value cannot be null. |
encode
static fun encode(vararg genres: String!): String!
Encodes genre strings to a text that can be put into the database.
| 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. |