Skip to content

Instantly share code, notes, and snippets.

@ademirqueiroga
Created February 22, 2023 18:47
Show Gist options
  • Save ademirqueiroga/f49881981222574c0498d2ea4c410383 to your computer and use it in GitHub Desktop.
Save ademirqueiroga/f49881981222574c0498d2ea4c410383 to your computer and use it in GitHub Desktop.
Ask permission to publish channel
try {
val intent = Intent(TvContractCompat.ACTION_REQUEST_CHANNEL_BROWSABLE)
intent.putExtra(TvContractCompat.EXTRA_CHANNEL_ID, channelId)
startActivityForResult(intent, REQUEST_CHANNEL_BROWSABLE)
} catch (exception: ActivityNotFoundException) {
// Handle exception
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment