Android TV and the manifest on Unity 4.6

Hi,

I’m having trouble with my Android TV app that is getting rejected by Google for crashing on launch on x86 devices (not arm oddly enough). And I have found that it’s how the .TvActivity is called that’s causing my problems. Here’s my Android Manifest file, could someone at Unity tell me what I’m doing wrong?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
 
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="com.android.vending.BILLING" />
 
  <uses-feature android:name="android.hardware.gamepad" android:required="true"/>
  <uses-feature android:name="android.software.leanback" android:required="true" />

  <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.bluetooth" 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"/>
 
  <application
          android:icon="@drawable/app_icon"
          android:banner="@drawable/banner"
          android:label="@string/app_name"
          android:debuggable="true"
          android:isGame="true">
   
    <meta-data android:name="isGame" android:value="true" />
   
   <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">
 
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
     
          <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
   
  </activity>
     

<activity
    android:name="com.unity3d.player.UnityPlayerNativeActivity.TvActivity"
    android:label="@string/app_name">

    <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </intent-filter>

</activity>
<activity android:name="com.outlinegames.unibill.PurchaseActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />

 
</application>
</manifest>

Alright, so I solved it myself, here’s the way a proper Android Manifest that Google Play will accept should look like:

Note: remember to add a banner.jpg to Plugins/Android/res/drawable-xhdpi/
(if you’re using Unity 4.6, if on Unity 5 there’s an option for this in the Player Settings)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="com.android.vending.BILLING" />
  <uses-feature android:name="android.hardware.gamepad" android:required="true"/>
  <uses-feature android:name="android.software.leanback" android:required="true" />
  <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.bluetooth" 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"/>
  <application
          android:icon="@drawable/app_icon"
          android:banner="@drawable/banner"
          android:label="@string/app_name"
          android:debuggable="true"
          android:isGame="true">
  
    <meta-data android:name="isGame" android:value="true" />
  
   <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    
          <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </intent-filter>
  
  </activity>
    
</application>
</manifest>