0

We tried to publish the Android TV apk from past couple of weeks due to Google's design guidelines and finally submitted the Android TV apk yesterday. Now when we try to publish a new APK version we get the error below:

 "You opted in to Android TV but your APK or Android App Bundle does not have the leanback intent."

Below is the manifest file from Android TV. Note : We have separate apps for Devices and TVs.

<?xml version=“1.0” encoding=“utf-8"?>
<manifest xmlns:android=“http://schemas.android.com/apk/res/android”
    package=“com.osn.go”>

    <uses-permission android:name=“android.permission.INTERNET” />
    <uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” />

    <application
        android:name=“.VikiApplication”
        android:allowBackup=“true”
        android:icon=“@mipmap/ic_launcher”
        android:label=“@string/app_name”
        android:largeHeap=“true”
        android:networkSecurityConfig=“@xml/network_security_config”
        android:resizeableActivity=“false”
        android:supportsRtl=“true”
        android:theme=“@style/AppTheme”>
        <activity
            android:name=“.activities.SplashActivity”
            android:label=“@string/app_name”
            android:theme=“@style/AppTheme.NoActionBar”>
            <intent-filter>
                <action android:name=“android.intent.action.MAIN” />

                <category android:name=“android.intent.category.LAUNCHER” />
            </intent-filter>
        </activity>
        <activity
            android:name=“.activities.MainActivity”
            android:label=“@string/app_name”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.details.MovieDetailsActivity”
            android:label=“@string/app_name”
            android:parentActivityName=“.activities.MainActivity”
            android:theme=“@style/AppTheme.NoActionBar”></activity>
        <activity
            android:name=“.activities.details.CollectionDetailsActivity”
            android:label=“@string/app_name”
            android:parentActivityName=“.activities.MainActivity”
            android:theme=“@style/AppTheme.NoActionBar”></activity>
        <activity
            android:name=“.activities.details.SeriesDetailsActivity”
            android:label=“@string/app_name”
            android:parentActivityName=“.activities.MainActivity”
            android:theme=“@style/AppTheme.NoActionBar”></activity>
        <activity
            android:name=“.activities.SearchActivity”
            android:label=“@string/app_name”
            android:theme=“@style/AppTheme.Main.Search”></activity>
        <activity
            android:name=“.activities.WebViewActivity”
            android:label=“@string/app_name”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.details.LiveEventDetailsActivity”
            android:label=“@string/app_name”
            android:parentActivityName=“.activities.MainActivity”
            android:theme=“@style/AppTheme.NoActionBar” />
        <activity
            android:name=“com.neulion.media.control.activity.NLVideoPlayerActivity”
            android:configChanges=“orientation|screenSize”
            android:parentActivityName=“.activities.MainActivity”
            android:screenOrientation=“landscape”>
            <meta-data
                android:name=“android.support.PARENT_ACTIVITY”
                android:value=“com.osn.go.activities.MainActivity” />
        </activity>
        <activity
            android:name=“.activities.NLPlayerActivity”
            android:configChanges=“orientation|screenSize”
            android:parentActivityName=“.activities.MainActivity”
            android:screenOrientation=“landscape”>
            <meta-data
                android:name=“android.support.PARENT_ACTIVITY”
                android:value=“com.osn.go.activities.MainActivity” />
        </activity>
        <activity
            android:name=“.activities.EpgActivity”
            android:label=“@string/app_name”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.WavoBaseActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.MyWavoActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.SettingsActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.AboutWavoActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.FaqActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.activities.SeeMoreActivity”
            android:theme=“@style/AppTheme.Main”></activity>
        <activity
            android:name=“.cast.ExpandedControlsActivity”
            android:label=“@string/app_name”
            android:launchMode=“singleTask”
            android:screenOrientation=“portrait”
            android:theme=“@style/Theme.CastVideosDark”>
            <intent-filter>
                <action android:name=“android.intent.action.MAIN” />
            </intent-filter>

            <meta-data
                android:name=“android.support.PARENT_ACTIVITY”
                android:value=“com.osn.go.activities.MainActivity” />
        </activity>

        <meta-data
            android:name=“io.fabric.ApiKey”
            android:value=“${crashlyticsApiKey}” />

        <uses-library
            android:name=“android.test.runner”
            android:required=“false” />


    </application>

</manifest>
hara
  • 3,274
  • 4
  • 37
  • 55
  • You can't lock the screen like `android:screenOrientation=“portrait”` in TV. Try to remove this. Check out this thread: https://stackoverflow.com/questions/51929882/google-play-warning-about-missing-leanback-intent – Md. Asaduzzaman Nov 05 '19 at 08:29
  • Thanks for your reply. Updated the file still the same issue. – Gautam Behal Nov 05 '19 at 10:44
  • Did you check the thread? there are lots of fact about that. Follow all the suggestions specially `tools:replace="android:screenOrientation"` – Md. Asaduzzaman Nov 05 '19 at 10:46

1 Answers1

0

Per https://developer.android.com/training/tv/start/start#tv-activity, you need an activity with the intent android.intent.category.LEANBACK_LAUNCHER:

<intent-filter>
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
Pierre
  • 15,865
  • 4
  • 36
  • 50