Search code examples
androidlauncher

Launcher label in Android 24 & 25-- Nougat


I have the following code in my Manifest file, which allows my .MainActivity to have the title "Just the Activity Name", and the launcher icon to have the label "FooBar". This consistently works fine in Android API Level 23 and below. However, in API 24 and 25, my launcher icon has the label "Just the Activity Name"-- it seems to be ignoring the label and icon I specify in the intent-filter.

Has anyone else experienced this?

Is there any way in API 24 or 25 (Nougat) to change the label of the icon in the launcher?

 <activity
        android:name=".MainActivity"
        android:label="Just the Activity Name">

        <intent-filter
            android:label="FooBar"
            android:icon="@mipmap/ic_action_thumb_up">
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
            <category android:name="android.intent.category.DEFAULT" />

        </intent-filter>
    </activity>

Solution

  • Icon of app is defined in application tag and label in launcher activity label as you have it

     <application
        android:icon="@mipmap/ic_launcher">
         <activity android:name=".MainActivity"
                   android:label="LAUNCHER ACTIVITY LABEL" />
     </application>
    

    This change in Nougat is because of app shortcuts