Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making AndroidTV app workable on FireTV

I have an android tv app using a leanback library that I want to publish to amazon tv store also. I know that we can use leanback library for fire tv as per this link using a standard LAUNCHER. However I am not sure about a few things:

  1. Recommendations

Android TV display content recommendations in the first row of the TV home screen

Content recommendations appear as the first row of the TV home screen after the first use of the device

For this we need to create a recommendation service and build recommendations in the android tv app.

Does FireTV also show recommendations and requires a recommendation service to be present in the firetv app? Quoting from this link

The global navigation menu is the primary system menu. It appears in a row on the left side of the screen. The global navigation menu allows the user to choose major content categories or other options including Search, Home, Movies, TV, Music, Games, Apps, and so on.

Is global navigation menu on the Fire TV similar to content recommendations row on Android TV?

  1. Global Search

Android TV uses the Android search interface to retrieve content data from installed apps and deliver search results to the user. Android TV app implements a Content Provider along with a searchable.xml configuration file for the purpose.

Is global search available on Fire TV and do we need to provide a content provider similar to Android TV app ? Quoting from this link

Global search is provided system-wide and is not customizable for individual apps. Developers may implement their own in-app search, but it is not included in the global search function.

  1. In app Search

The Leanback support library provides a set of classes to enable a standard search interface within your app that is consistent with other search functions on TV and provides features such as voice input.

Since leanback support library can be used with Android API level 17 for Fire TV, I think leanback SearchFragment can be used for FireTV as well. But is voice input to be handled differently?

like image 270
random Avatar asked Jun 19 '15 05:06

random


1 Answers

  1. Recommendations

No, Fire TV does not support recommendations, IIRC.

  1. Global search

Same as the previous point.

  1. In app search

Yes, you can use the SearchFragment class. However (not sure about the recent versions of Leanback), there are a few quirks due to how the mic input is handled. One of the things that were to be done is disabling the speech recognizer:

Field mSpeechRecognizerField = SearchFragment.class.getDeclaredField("mSpeechRecognizer");
mSpeechRecognizerField.setAccessible(true);
mSpeechRecognizerField.set(this, null);

You may encounter one or two more.

like image 58
Sebastiano Avatar answered Oct 18 '22 11:10

Sebastiano