0

I am building Apps for Android TV. In the app, I give users the option to display further apps that I have created. On all Android devices this works fine by starting an intent that starts Google Play and runs a search as described via here: Linking to Google Play.

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(
        "http://play.google.com/store/search?q=<search_query>&c=apps"));
intent.setPackage("com.android.vending");
startActivity(intent);

On all devices, when I start the intent, Google Play pops up and displays the results of my query.

On Android TV devices however, the same action purely results in a toast being displayed: "play store search is not available". I did not find a solution yet of how to code such a search in a way, that it also runs on Android TV respectively on Google TV devices.

Google Play is available on all devices that I tested this. On all devices I was logged on to Google with a valid account. Running the intent with a simple link to a Play Store App works fine. Running it with a link to the search does not.

wilco
  • 1
  • 1
  • There are a variety of these sorts of things that are available on phones and tablets and are not available on other form factors (watch, TV, car). And, in some cases, the results will vary by device model (e.g., `ACTION_OPEN_DOCUMENT` works on the NVIDIA Shield TV but not some other Android TV models). You could try removing the `setPackage()` call, but regardless, do not assume that this will work across all Android TV environments. – CommonsWare Dec 05 '22 at 23:23

0 Answers0