我已经创建了一个 Android TV 应用程序,它可以在我的 ADT-1 上按预期运行。不过,我发现如果我使用 ADB 安装它,它也可以在我的 Nexus 10 和 Nexus 4 设备上运行(尽管它在 Nexus 4 上并不真正可用,因为你在屏幕上看不到足够的内容)。
当我在 Google Play 上以 Beta 测试模式发布它时,我实际上可以在所有 3 台设备上安装它。但该图标仅显示在 ADT-1 上,我只能从那里启动它。它不会在其他设备上显示为已安装的应用,并且在 Google Play 中没有启动选项,只有“卸载”。
所以我要么需要它在平板电脑上运行(它实际上看起来不错),要么不允许人们安装它,除非在 Android TV 设备上。然而,Google Play 实际上要求您上传 Android TV 和 10 英寸平板电脑的屏幕截图。那么我错过了什么?
最佳答案
根据 Get Started with TV Apps leanback section :
Declare that your app uses the Leanback user interface required by Android TV. If you are developing an app that runs on mobile (phones, wearables, tablets, etc.) as well as Android TV, set the required attribute value to false. If you set the required attribute value to true, your app will run only on devices that use the Leanback UI.
<manifest> <uses-feature android:name="android.software.leanback" android:required="false" /> ... </manifest>
如果您只想让应用显示在 Android TV 设备上,请将其设置为 true
。
关于android - 对 Android TV 应用与其他设备的兼容性感到困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27977548/