我已经在google商店发布了一个用于android电视的react原生应用程序。
如欲收看电视节目,本人已接获以下通知:
缺少DPad功能您的应用程序需要用户交互菜单或应用程序导航。请确保使用DPad的所有菜单和应用程序导航都是完全功能的。请参阅我们的DPAD控制和硬件声明文件。
我们如何为反应型原生android应用程序启用d-pad导航?
如果你需要更多的信息,就告诉我。
发布于 2018-09-04 13:41:32
最后,我已经修复了d-pad导航和响应本地android电视应用程序的横幅问题.
这些问题是:(这包括甚至不属于问题一部分的问题)
1.没有全尺寸应用程序横幅
(**dimensions 320px x 180px and 320 dpi**),:"your-app/android/app/src/main/res"下的 create a folder called drawable,添加一个png文件,最重要的部分是within image, there should be no other text then application name,您已经用它发布了APK。
2.不受支持的硬件使用
Fix:在发布这个问题之前修复了这个问题,但是如果您正面临这个问题,
refer the answer by **@reidisaki** on this question.3.缺少DPad功能(问题中提出的实际问题)
修复:,我在屏幕上使用InputText。好吧,在安卓/安卓电视的InputText cannot be focused by d-pad (定向衬垫)的react-native version 0.56下。I stopped using TextInput和它修复了d-pad导航.它也可以在android模拟器中使用来测试这个应用程序。
为了使我的应用程序更加兼容电视,在AndroidManifest.xml中,我将活动启动程序升级为:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>要将主题升级为android tv的精简版:
added leanback library到依赖项下的"app-name/android/app/build.gradle“:
依赖{..。编译"com.android.support:leanback-v17:${rootProject.ext.supportLibVersion}“}@style/Theme.Leanback
……发布于 2018-08-20 15:52:22
你的清单是否声明了正确的用途-特征?主要是第一个otne touchScreen需要false
<uses-feature android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature android:name="android.hardware.faketouch"
android:required="false"/>
<uses-feature android:name="android.hardware.telephony"
android:required="false"/>
<uses-feature android:name="android.hardware.camera"
android:required="false"/>
<uses-feature android:name="android.hardware.nfc"
android:required="false"/>
<uses-feature android:name="android.hardware.location.gps"
android:required="false"/>
<uses-feature android:name="android.hardware.microphone"
android:required="false"/>
<uses-feature android:name="android.hardware.sensor"
android:required="false"/>我也希望发布一款android电视应用程序,以响应本地用户的需求,但androidtv的焦点管理存在缺陷,即如果你点击正确的按钮,但该项目垂直于上方,而对右边的android电视则什么也不做。
编辑-你试过实现这些配置吗?
<uses-configuration
android:reqFiveWayNav=["true" | "false"]
android:reqHardKeyboard=["true" | "false"]
android:reqKeyboardType=["undefined" | "nokeys" | "qwerty" | "twelvekey"]
android:reqNavigation=["undefined" | "nonav" | "dpad" | "trackball" | "wheel"]
android:reqTouchScreen=["undefined" | "notouch" | "stylus" | "finger"] />发布于 2020-02-05 15:00:12
我也遇到了这个问题(并设法解决了)。
在我的例子中,缺少的Dpad功能问题与使用TextInput组件有关,而AndroidTV还没有完全支持这个组件(不能使用DPad来集中精力)。
我通过使用黑客使TextInput可聚焦来修复它。也就是说,将其封装在一个可触摸的(TouchableWithoutFeedback、TouchableOpacity和TouchableHighlight都将为此目的工作)中,并使用onFocus处理程序来管理嵌套TextInput组件上的焦点。
类似于这样的东西:
<TouchableOpacity
onFocus={() => {
textInput && textInput.current.focus();
}}
>
<TextInput ref={textInput} />
</TouchableOpacity>在TextInput焦点问题得到解决后,应用程序被批准用于AndroidTV
https://stackoverflow.com/questions/51888892
复制相似问题