Skip to content

Instantly share code, notes, and snippets.

@ademirqueiroga
Last active February 22, 2023 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ademirqueiroga/0b370d77fcaf5d982c3bf299cc8009ea to your computer and use it in GitHub Desktop.
Save ademirqueiroga/0b370d77fcaf5d982c3bf299cc8009ea to your computer and use it in GitHub Desktop.
Insert/Update channel
when (existingChannel) {
null -> context.contentResolver.insert(
TvContractCompat.Channels.CONTENT_URI,
channel.toContentValues()
)
else -> context.contentResolver.update(
TvContractCompat.Channels.CONTENT_URI,
channel.toContentValues(),
null,
null
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment