googlearchive/androidtv-Leanback

apk don't have intent leanback

andrewger157 opened this issue · 8 comments

Hi,
I don't know if this is the right place to ask for info on this problem but I hope you can help me.

I'm trying to release an update of my TV app but the console gives me the following warning
"You've activated Android TV, but the APK or the Android App Bundle does not have the Leanback intent."

The app is already on the store for several years and the last update was done in August 2018 and I had no problems. The new update contains only bug fixing.

Can you tell me what I'm doing wrong?

My app uses the "leanback-v17: 26.0.2"

Your app manifest should have the leanback launcher intent filter as part of your main activity.

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

Thanks, the problem is that my manifest already has the intent filter.
So far I have never had problems, only with the new apk I have this warning but installing it manually on the TV works properly

This is the manifest of my app:

<uses-sdk xmlns:tools="http://schemas.android.com/tools"
    tools:overrideLibrary="xx.xxx.tv,android.support.v17.leanback,android.support.v17.preference" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA" />
<uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" />
<uses-permission android:name="com.android.permission.BIND_JOB_SERVICE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />


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

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

<permission android:name="xx.xxx.permission"
    android:protectionLevel="signature"/>

<application
    android:name=".xxx.Application"
    android:allowBackup="false"
    android:banner="@drawable/ic_launcher_logo_tv"
    android:hardwareAccelerated="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:logo="@drawable/ic_launcher_logo_tv"
    android:theme="@style/AppTheme">
    <activity android:name=".xxx.activity.SplashActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
        </intent-filter>
    </activity>


    <!-- Activities for TV -->
    <activity
        android:name=".xxx.activity.HomeActivityForTv"
        android:exported="true"
        android:theme="@style/CustomLeanbackTheme">

        <!-- Receives the search request. -->
        <intent-filter>
            <action android:name="android.intent.action.SEARCH" />
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            <!-- No category needed, because the Intent will specify this class component -->
        </intent-filter>

        <!-- Points to searchable meta data. -->
        <meta-data
            android:name="android.app.searchable"
            android:resource="@xml/searchable" />

    </activity>

    <activity
        android:name=".xxx.activity.SearchActivityForTv"
        android:theme="@style/CustomLeanbackTheme"
        android:exported="true"/>

    <activity android:name=".xxx.oreotv.AppLinkActivity">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data
                android:host="app"
                android:scheme="xxxtv" />
        </intent-filter>
    </activity>

    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />

    <service
        android:name=".xxx.oreotv.jobservice.SyncChannelJobService"
        android:exported="false"
        android:permission="android.permission.BIND_JOB_SERVICE" />

    <service
        android:name=".xxx.oreotv.jobservice.SyncProgramsJobService"
        android:exported="false"
        android:permission="android.permission.BIND_JOB_SERVICE" />

    <service
        android:name=".xxx.oreotv.contentProvider.FetchDiretteService"
        android:exported="true"
        android:permission="android.permission.BIND_JOB_SERVICE" />

    <service
        android:name=".xxx.oreotv.receiver.BootService"
        android:exported="true"
        android:permission="android.permission.BIND_JOB_SERVICE" />

    <provider
        android:name=".xxx.oreotv.contentProvider.LiveProvider"
        android:authorities="xx.xxx.xxx"
        android:exported="false"
        android:permission="xx.xxx.permission">
    </provider>

    <receiver
        android:name=".xxx.oreotv.receiver.BootCompletedReceiver"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.REBOOT" />
            <action android:name="android.media.tv.action.INITIALIZE_PROGRAMS" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>

</application>

Try adding it as a separate intent-filter, instead of having it alongside the LAUNCHER category. (For SplashActivity)

In this way?

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

What I do not explain is that until the last release (August 2018) I have never had problems....

I have tried to upload a new apk with this manifest, but I have the same error

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA"/>
<uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA"/>
<uses-permission android:name="com.android.permission.BIND_JOB_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="android.software.leanback" android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<application android:allowBackup="false" android:banner="@drawable/ic_launcher_logo_tv" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:largeHeap="true" android:logo="@drawable/ic_launcher_logo_tv" android:name="xx.xxx.Application" android:supportsRtl="true" android:theme="@style/AppTheme">
    <activity android:name="xx.xxx.activity.SplashActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
        </intent-filter>
    </activity>
    <activity android:exported="true" android:name="xx.xxx.activity.HomeActivityForTv" android:theme="@style/CustomLeanbackTheme">
        <intent-filter>
            <action android:name="android.intent.action.SEARCH"/>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
        </intent-filter>
        <meta-data android:name="android.app.searchable" android:resource="@xml/searchable"/>
    </activity>
    <activity android:exported="true" android:name="xx.xxx.activity.SearchActivityForTv" android:theme="@style/CustomLeanbackTheme"/>
    <activity android:name="xx.xxx.oreotv.AppLinkActivity">
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:host="app" android:scheme="xxxtv"/>
        </intent-filter>
    </activity>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
    <service android:exported="false" android:name="xx.xxx.oreotv.jobservice.SyncChannelJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:exported="false" android:name="xx.xxx.oreotv.jobservice.SyncProgramsJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:exported="true" android:name="xx.xxx.oreotv.contentProvider.FetchDiretteService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:exported="true" android:name="xx.xxx.oreotv.receiver.BootService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <provider android:authorities="xx.xxx" android:exported="false" android:name="xx.xxx.oreotv.contentProvider.DiretteProvider"/>
    <receiver android:exported="true" android:name="xx.xxx.oreotv.receiver.BootCompletedReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.REBOOT"/>
            <action android:name="android.media.tv.action.INITIALIZE_PROGRAMS"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
    </receiver>
    <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:name="com.facebook.FacebookActivity" android:theme="@style/com_facebook_activity_theme"/>
    <activity android:name="com.facebook.CustomTabMainActivity"/>
    <activity android:name="com.facebook.CustomTabActivity"/>
    <activity android:exported="false" android:label="" android:name="pub.devrel.easypermissions.AppSettingsDialogHolderActivity" android:theme="@style/EasyPermissions.Transparent"/>
    <receiver android:exported="false" android:name="com.google.android.gms.cast.framework.media.MediaIntentReceiver"/>
    <service android:name="com.google.android.gms.cast.framework.media.MediaNotificationService"/>
    <service android:name="com.google.android.gms.cast.framework.ReconnectionService"/>
    <activity android:name="com.novoda.downloadmanager.lib.SizeLimitActivity"/>
    <activity android:excludeFromRecents="true" android:exported="false" android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
    <service android:exported="true" android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION"/>
    <service android:exported="true" android:name="com.google.firebase.messaging.FirebaseMessagingService">
        <intent-filter android:priority="-500">
            <action android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
    </service>
    <provider android:authorities="xx.xxx.androidtv.crashlyticsinitprovider" android:exported="false" android:initOrder="100" android:name="com.crashlytics.android.CrashlyticsInitProvider"/>
    <meta-data android:name="android.support.VERSION" android:value="26.0.2"/>
    <provider android:authorities="xx.xxx.androidtv.MarketingInitProvider" android:exported="false" android:name="com.facebook.marketing.internal.MarketingInitProvider"/>
    <provider android:authorities="xx.xxx.androidtv.FacebookInitProvider" android:exported="false" android:name="com.facebook.internal.FacebookInitProvider"/>
    <receiver android:exported="false" android:name="com.facebook.CurrentAccessTokenExpirationBroadcastReceiver">
        <intent-filter>
            <action android:name="com.facebook.sdk.ACTION_CURRENT_ACCESS_TOKEN_CHANGED"/>
        </intent-filter>
    </receiver>
    <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="com.twitter.sdk.android.tweetui.PlayerActivity" android:theme="@style/MediaTheme"/>
    <activity android:name="com.twitter.sdk.android.tweetui.GalleryActivity" android:theme="@style/MediaTheme"/>
    <service android:exported="false" android:name="com.google.firebase.components.ComponentDiscoveryService">
        <meta-data android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
        <meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
    </service>
    <receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementReceiver"/>
    <receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:permission="android.permission.INSTALL_PACKAGES">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER"/>
        </intent-filter>
    </receiver>
    <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService"/>
    <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <receiver android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
        </intent-filter>
    </receiver>
    <service android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdService">
        <intent-filter android:priority="-500">
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
        </intent-filter>
    </service>
    <activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
    <provider android:authorities="xx.xxx.androidtv.firebaseinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
    <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:exported="false" android:name="com.google.android.gms.ads.AdActivity" android:theme="@android:style/Theme.Translucent"/>
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
    <service android:exported="false" android:name="com.evernote.android.job.v21.PlatformJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:exported="false" android:name="com.evernote.android.job.v14.PlatformAlarmService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <service android:exported="false" android:name="com.evernote.android.job.v14.PlatformAlarmServiceExact"/>
    <receiver android:exported="false" android:name="com.evernote.android.job.v14.PlatformAlarmReceiver">
        <intent-filter>
            <action android:name="com.evernote.android.job.v14.RUN_JOB"/>
            <action android:name="net.vrallev.android.job.v14.RUN_JOB"/>
        </intent-filter>
    </receiver>
    <receiver android:exported="false" android:name="com.evernote.android.job.JobBootReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
            <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
            <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
        </intent-filter>
    </receiver>
    <service android:enabled="false" android:exported="true" android:name="com.evernote.android.job.gcm.PlatformGcmService" android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE">
        <intent-filter>
            <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
        </intent-filter>
    </service>
    <service android:exported="false" android:name="com.evernote.android.job.JobRescheduleService" android:permission="android.permission.BIND_JOB_SERVICE"/>
    <activity android:exported="false" android:name="com.twitter.sdk.android.tweetcomposer.ComposerActivity" android:windowSoftInputMode="adjustResize|stateVisible"/>
    <service android:enabled="true" android:exported="false" android:name="com.twitter.sdk.android.tweetcomposer.TweetUploadService"/>
    <activity android:configChanges="orientation|screenSize" android:excludeFromRecents="true" android:exported="false" android:name="com.twitter.sdk.android.core.identity.OAuthActivity"/>
    <activity android:configChanges="orientation|screenSize" android:excludeFromRecents="true" android:exported="false" android:icon="@drawable/tw__transparent" android:label="@string/kit_name" android:name="com.twitter.sdk.android.core.identity.ShareEmailActivity"/>
</application>

I found another developer who has the same problem (https://stackoverflow.com/questions/51929882/google-play-warning-about-missing-leanback-intent), but I did not find any useful information to solve my problem.

Can someone help me?

Have the controls for submitting the TV app changed?

Thanks

I have this issue as well. From what I can tell i have everything in my manifest that needs to be there but for some reason the play console is saying that my apk does not contain the intent filter for LEANBACK_LAUNCHER. Can someone assist?

Hi, unfortunately I did not find the cause of this problem, but I published the app ignoring the warning and the app is working properly.