6

Installer window

I would like to change the application name and label in the installer window (see the attached image). Name and label is, by default, the package name. Even though I added custom name and label in AndroidManifest.xml, it is not reflected in this installer window.

AndroidManifest.xml is given below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.style"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />

<application android:icon="@drawable/icon" 
            android:label="@string/app_name">
    <activity android:name=".StylePageActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>
</manifest>

And the custom name in strings.xml (or /res/values/base-strings.xml) is

<string name="app_name">Demo Application</string>
ujjal das
  • 601
  • 6
  • 13
Renjith
  • 2,918
  • 5
  • 40
  • 60
  • 2
    Maybe you should copy/paste the relevant parts of your manifest file here... – Vincent Mimoun-Prat Jul 27 '11 at 09:38
  • 3
    Duplicate of [How to change an Android app's name?](http://stackoverflow.com/questions/5443304/how-to-change-an-android-apps-name) and [this](http://stackoverflow.com/a/13200774/1269037) is the answer you want. – Dan Dascalescu Feb 03 '16 at 23:27

4 Answers4

7

You can change the name (or package) of your application in AndroidManifest.xml in the <manifest package="..." part and you can change the name of the app by changing the android:label attribute in the <application> tag in the same file.

Please note that changing the package of your application essentially registers as a totally different application from the previous one (as far as Android is concerned).

sparkymat
  • 9,374
  • 3
  • 28
  • 48
  • I don't want to change the package name. All I need is a meaningful label to application. – Renjith Jul 27 '11 at 10:08
  • Then you need to change `android:label` which is now pointing to `@string\app_name` . app_name is defined in res\strings.xml. You can change the value there to change the label name. – sparkymat Jul 27 '11 at 10:10
  • Yes I did. But failed! Still showing the same package name. Meanwhile I analysed manifest file of K9 mail. It has also android:label in it. I copied apk file and tried to install. Again in the installer window is the package name as label – Renjith Jul 27 '11 at 10:17
  • Please paste your AndroidManifest.xml (update your question with the contents of AndroidManifest.xml). – sparkymat Jul 27 '11 at 10:22
  • AndroidManifest.xml looks ok. Can you paste the relevant parts of strings.xml? – sparkymat Jul 27 '11 at 11:27
  • This is quite weird. I have no idea why its not reflecting. Make sure you are doing clean build and uninstall-reinstall the application. – sparkymat Jul 27 '11 at 13:00
  • Me neither! I have observed the same in popular e-mail client, K9. – Renjith Jul 27 '11 at 13:05
3

Can you post your Manifest file here. Below works well for me:

<application android:icon="@drawable/launcher_icon"
    android:label="@string/app_name" android:theme="@android:style/ Theme.NoTitleBar">
Ash
  • 1,371
  • 15
  • 20
  • i think there may be problem with variable app_name change it from folder res/values/strings.xml>app_name=YourAppName – Hanry Jul 27 '11 at 10:06
  • @Renjith Hi.. Can you remove/uninstall app from ur emulator/phone and give a clean build and install it again!! Your menifest file looks good!! – Ash Jul 27 '11 at 13:58
  • @Ash No way! this is really eating ma head off. I did a clean build, uninstalled the app, rebooted the phone and tried installing again. But still the label in the installer window is that of the package. – Renjith Jul 27 '11 at 14:41
  • @Ash but what intrigues me is even the email client application (K9 mail), available from the android market, has package name as label in the installer window. – Renjith Jul 27 '11 at 14:48
  • @Renjith The screen shot you have mentioned of Installer Window is of which Application..I will try to reproduce it on my phone/emulator. Usually I go to Application->Manage Application to see and manage all the app installed on my phone. Are you using a third party installer app. – Ash Jul 28 '11 at 06:07
  • @Ash That is a small application I developed. You can try with any of the apk files. – Renjith Jul 28 '11 at 08:55
  • @Renjith Sorry i meant..how can i see the screen which u have pasted here, In my phone when i go to Application->Manage Application I dont see package names there only App name n their details!! – Ash Jul 28 '11 at 09:38
  • @Ash Follow these to reproduce. (a) Copy apk file to your phone. (b) Browse it using file manager. (c) Tap the file (d) In the dialog, choose 'Open App Manager' and there you're! – Renjith Jul 28 '11 at 10:06
  • @Renjith with my file Browser i dont see Open App Manager option , It just ask for install/cancel option..Are u using third party App Manager? – Ash Jul 28 '11 at 10:15
  • @Ash Were you able to reproduce the above screen? – Renjith Jul 29 '11 at 10:15
  • @Renjith ..no as i could not find that App – Ash Aug 01 '11 at 09:01
  • @Ash It is one of the popular applications in android market. Search for 'Astro file manager' in the market! – Renjith Aug 01 '11 at 10:48
1

in your activity

this.setTitle("your text");

this works for me

manichandra
  • 146
  • 1
  • 2
0

go to strings.xml in res/values folder and changed the value of "app_name"

<resources>
<string name="app_name">DESIRED_NAME</string>
</resources>

also, rename the name of the .apk file after building the apk. I think this will solve your problem.

ujjal das
  • 601
  • 6
  • 13