UPDATE: change your uri to:
Version 3 of GTV
content://com.google.tv.mediadevicesapp.ChannelListingProvider/channel_listing
Also:
change required permission from com.google.android.tv.permission.READ_CHANNELS to com.google.android.tv.mediadevices.permission.READ_STREAMS
The data you get back will be a little different too:
"channel_uri" changed to "url"
"channel_name" changed to "name"
"channel_number" changed to "channelNumber"
"callsign" changed to "subName"
To support both v2 & v3
int version = 0;
try {
Class cl = Class.forName("com.google.android.tv.Version");
version = cl.getField("GTV_SDK_INT").getInt(null); }
catch (Exception ex) {}
String contentUri;
if (version == 0) {
// We're on old (Pre-V3 GoogleTV)
contentUri = "content://com.google.android.tv.provider/channel_listing";
} else {
// We're on V3 or newer.
contentUri = "content://com.google.tv.mediadevicesapp.ChannelListingProvider/channel_listing";
// or, if you're using the framework library:
// Uri contentUri = com.google.android.tv.provider.ChannelListingContract.Channels.CHANNEL_LISTING_URI
}
/*
Column names are:
callsign
channel_name
channel_number
channel_uri
data_source
*/