Reputation: 179
Getting this exception on androidTv
Fatal Exception: java.lang.IllegalArgumentException: Unknown URL content://android.media.tv/channel at android.content.ContentResolver.insert(ContentResolver.java:2189) at android.content.ContentResolver.insert(ContentResolver.java:2155)
** Inserting channel** val displayName = context.getString(R.string.name) val appLinkIntentUri = Uri.parse("https://example.com").buildUpon().build()
val builder = Channel.Builder()
builder.setType(TvContractCompat.Channels.TYPE_PREVIEW)
.setDisplayName(displayName)
.setAppLinkIntentUri(appLinkIntentUri)
// Insert the channel into the provider.
val channelUri = context.contentResolver.insert(
TvContractCompat.Channels.CONTENT_URI, builder.build().toContentValues()
)
Issue occured place inside content resolver val channelUri = context.contentResolver.insert
Upvotes: 0
Views: 84