The name of my Android app shown from the apps menu/shortcut on the homescreen is wrong. Instead of being the app name, it is the name of the first activity that is launched. Apparently, many people have solved the problem with answers such as: How to set different label for launcher rather than activity title?
This works on all my devices and emulators except for my Nexus 5 (Android 4.4.4). A selection of the manifest file currently looks like this:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".MainApp">
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id"/>
...
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="TrainingActivity"
android:label="@string/training_title"
android:screenOrientation="portrait"
android:theme="@style/Theme.style">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
As per the other answers, I have given the intent-filter a label but it is still shows the name of the first activity in the launcher. At present, the app name is correct on: Genymotion emulator (Nexus 5, 4.4.4. and 4.4.3), HTC One M7 (Android 4.4.3), Moto G (Android 4.4.3) and Samsung Galaxy Ace (2.3).
I don't have any other devices to test on to see how persistent the problem is. I have restarted the Nexus 5, uninstalled the app etc...
Any help would be really appreciated.