使 AndroidTV 应用程序可在 FireTV 上运行 [英] Making AndroidTV app workable on FireTV

查看:31
本文介绍了使 AndroidTV 应用程序可在 FireTV 上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Leanback 库的 android 电视应用程序,我也想将其发布到亚马逊电视商店.我知道我们可以按照 此链接 使用标准LAUNCHER.但是我不确定一些事情:

  1. 建议

Android TV 在电视主屏幕第一行显示内容推荐

<块引用>

推荐内容显示在电视主屏幕的第一行第一次使用设备后

为此,我们需要创建一个推荐服务构建建议 在 android 电视应用中.

FireTV 是否也显示推荐并且需要在 firetv 应用中提供推荐服务?引用自 此链接

<块引用>

全局导航菜单是主要的系统菜单.它出现在一个屏幕左侧的行.全局导航菜单允许用户选择主要内容类别或其他选项,包括搜索、家庭、电影、电视、音乐、游戏、应用等.

Fire TV 上的全局导航菜单是否类似于 Android TV 上的内容推荐行?

  1. 全局搜索

Android TV 使用 Android 搜索界面从已安装的应用中检索内容数据并将搜索结果提供给用户.为此,Android TV 应用实现了一个 Content Provider 以及一个 searchable.xml 配置文件.

Fire TV 上是否可以进行全局搜索?我们是否需要提供类似于 Android TV 应用的内容提供商?引用自 此链接

<块引用>

全局搜索在系统范围内提供,不可针对个人应用程序.开发者可以实现自己的应用内搜索,但不包含在全局搜索功能中.

  1. 应用内搜索

<块引用>

Leanback 支持库提供了一组类来启用您的应用程序中的标准搜索界面与电视上的其他搜索功能并提供语音等功能输入.

由于leanback 支持库可以与Android API 级别17 一起用于Fire TV,我认为leanback SearchFragment 也可以用于FireTV.但是语音输入的处理方式不同吗?

解决方案

  1. 建议

不,Fire TV 不支持推荐,IIRC.

  1. 全球搜索

同上一点.

  1. 应用内搜索

是的,您可以使用 SearchFragment 类.但是(不确定 Leanback 的最新版本),由于麦克风输入的处理方式,存在一些怪癖.要做的一件事是禁用语音识别器:

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

您可能还会遇到一两个.

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?

解决方案

  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.

这篇关于使 AndroidTV 应用程序可在 FireTV 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆