androidandroid-manifestsystemandroid-tv

App installed but icon doesn't appear in launcher screen or app list


Android system level settings application is installed but icon doesn't appear in launcher screen.I have shared piece of manifest file.

<application
    android:icon="@drawable/logo_settings_color_48dp"
    android:label="@string/settings_app_name"
    android:banner="@drawable/ic_launcher_banner_settings"
    android:supportsRtl="true"
    android:theme="@style/Theme.Settings"
    android:usesCleartextTraffic="true">
    <activity
        android:name=".MainSettings"
        android:excludeFromRecents="true"
        android:theme="@style/Theme.Settings.Transparent"
        android:configChanges="keyboard|keyboardHidden|navigation"
        android:label="@string/settings_app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER"/>
            <action android:name="android.settings.SETTINGS" />
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
        <intent-filter
            android:priority="3"
            android:label="@string/launcher_settings_app_name"
            android:icon="@drawable/ic_settings_launcher_icon" >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LEANBACK_SETTINGS" />
        </intent-filter>
    </activity>  

Solution

  • Declare a TV Activity

    An application intended to run on TV devices must declare a launcher activity for TV in its manifest. It uses a CATEGORY_LEANBACK_LAUNCHER intent filter to do this. This filter identifies your app as being enabled for TV, and lets Google Play identify it as a TV app. When a user selects your app on their TV home screen, this intent identifies which activity to launch.

    [...]

    Caution: If you do not include the CATEGORY_LEANBACK_LAUNCHER intent filter in your app, it is not visible to users running Google Play on TV devices. Also, if your app does not have this filter when you use developer tools to load it onto a TV device, the app does not appear in the TV user interface.

    Source: Getting Started with TV Apps

    So an activity has to have this intent filter to appear in a TV launcher:

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

    The code which you probably copied from here defines system settings entry point in launcher.

    If you're building some kind of systm level app you should mention that in your question.