-4

How to add a text string to icon that will be visible on the phone after installation of pkg. file generated by Android Studio, i managed to change the icon by adding android:icon= into manifest file but how to also add text as always shown on every app in the phone?

Here is my manifest file, still NO text under the icon in phone!

<?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Include only BLE capable devices.-->
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

<application
    android:icon="@mipmap/my_icon"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">

    <activity
        android:name=".first_activity"
        android:label=""
        android:screenOrientation="portrait"
        android:configChanges="keyboardHidden|orientation|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".second_activity"
        android:label="@string/title_activity_graph_activity"
        android:parentActivityName=".first_activity"
        android:configChanges="orientation|screenSize" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".first_activity" />
    </activity>

</application>

Mikael
  • 463
  • 2
  • 5
  • 15
  • 1
    Possible duplicate of [How to change an Android app's name?](http://stackoverflow.com/questions/5443304/how-to-change-an-android-apps-name) – Ravi Oct 14 '15 at 08:58
  • NO its not the same question as the one above! Please remove -3 on this one! Text doesnt show in the question before add the title but not working, any other ideas ? – Mikael Oct 14 '15 at 10:48

1 Answers1

0

<application android:label="@string/app_name" ...

Change the value of android:label inside the application tag. Usually it takes the value of @string/app_name. So just go to res->values->strings and change the "app_name"

Jelle van Es
  • 538
  • 4
  • 19
  • Tried already didnt help, is it something with visibility somehow? Can that also be set ? – Mikael Oct 14 '15 at 09:06
  • 1
    That is a different thing, it wont help you: android:label : A user-readable label for the application as a whole, and a default label for each of the application's components. See the individual label attributes for , , , , and elements. The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string. – KERiii Oct 14 '15 at 09:06
  • @Mikael I tested it myself it does work for me. Please delete your app from your phone and run again. See if that helps. – Jelle van Es Oct 14 '15 at 09:34