仅适用于Android TV的Android清单 - 支持设备太少?

4
我使用Unity3D创建了一个Android电视应用程序,并尝试撰写一份适当的Android清单文件。我想要的是我的应用程序能够在尽可能多的Android电视设备上显示,但不出现在智能手机和平板电脑上。
文档中提到:
声明您的应用程序使用Leanback用户界面,这是Android TV所必需的。如果您正在开发一款运行于移动设备(手机、可穿戴设备、平板电脑等)以及Android TV的应用程序,则将所需属性值设置为false。如果将所需属性值设置为true,则您的应用程序仅在使用Leanback UI的设备上运行。
因此,在我的清单文件中将leanback required设置为true。这将减少我的应用程序启动的设备数量,只有40个,例如不包括我的测试设备(Sony Bravia KDL 55W805C)。对于Sony Bravia设备,似乎它只包括4K型号,这比必要的限制要严格得多。
我是否错误地假设所有Android电视都使用Leanback UI?我的清单文件需要添加/删除哪些内容,才能使该应用程序在尽可能多的Android TV设备上可用,而不包括智能手机或平板电脑?
以下是整个清单文件,以防问题出现在其他地方:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<uses-feature 
    android:name="android.hardware.touchscreen"
    android:required="false" />
<uses-feature 
    android:name="android.software.leanback"
    android:required="true" />
<supports-screens
    android:smallScreens="false"
    android:normalScreens="false"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:requiresSmallestWidthDp="600" />

<application
    android:theme="@style/UnityThemeSelector"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:debuggable="true">
    <activity 
            android:name="com.unity3d.player.UnityPlayerActivity"
            android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </activity>
</application>


你怎么知道Sony Bravia不在那40个列表中?另外,你可能想参考这篇Stack Overflow的帖子。 - Kyle Venn
因为列表是按制造商排序的,列表中只有两个Sony Bravia,但并没有我拥有的那个。但是我后来发现,设备列表并不准确:我们公司推出的另一个应用程序也仅列出了四十个设备,但可以在列表之外的设备上下载。 - Alice
2个回答

1
SONY电视列表在开发者控制台上有点误导,但基本上可以看作是:“BRAVIA 4K - SVP-DTV15”=[所有2K/4K 2015型号]。“BRAVIA 4K GB - BRAVIA_ATV2”=[所有2K/4K 2016+型号]。在此处查看更多信息:https://developer.sony.com/develop/tvs/android-tv/

0

我曾经遇到过同样的问题。我从清单文件中删除了RECORD_AUDIO权限,并只添加了以下权限:

    <uses-feature
    android:name="android.software.leanback"
    android:required="true" />

    <uses-feature android:required="false" android:name="android.hardware.faketouch"/>
    <uses-feature android:required="false" android:name="android.hardware.touchscreen"/>

现在它支持超过40个带有Android TV的电视线路。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接