2016-09-20 86 views
1

我已經使用Unity3D創建了一個Android TV應用程序,並且試圖編寫正確的Android清單。Android Manifest僅適用於Android TV - 支持的設備太少?

我想要的是讓我的應用在儘可能多的Android TV設備上顯示,而不是在智能手機和平板電腦上顯示。

文檔說:你的應用程序使用由Android TV提供所需的Leanback的用戶界面

申報。如果您正在開發在移動設備(手機,可穿戴設備,平板電腦等)上運行的應用以及Android TV,請將必需的屬性值設置爲false。如果您將必需屬性值設置爲true,則您的應用只能在使用Leanback UI的設備上運行。

因此,我在我的清單中將leanback設置爲true。 這將我的應用程序將啓動的設備數量減少到40個,並且不包括我自己的測試設備(例如Sony Bravia KDL 55W805C)。對於索尼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> 

+0

你怎麼知道索尼Bravia不屬於40的名單?你也可能想參考[這個SO帖子](http://stackoverflow.com/a/37724735/1759443)。 –

+0

由於該清單是按製造商排序的,清單上只有兩個索尼Bravia,但沒有我擁有的索尼Bravia。不過,我發現設備列表並不準確:我公司推出的另一個應用程序也只列出了40個設備,但可以在不在列表中的設備上下載。 – Alice

回答

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電視。