Change application name and label
Asked Answered
I

5

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>
Insinuate answered 27/7, 2011 at 9:30 Comment(2)
Maybe you should copy/paste the relevant parts of your manifest file here...Epispastic
Duplicate of How to change an Android app's name? and this is the answer you want.Fade
B
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).

Beforetime answered 27/7, 2011 at 9:39 Comment(7)
I don't want to change the package name. All I need is a meaningful label to application.Insinuate
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.Beforetime
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 labelInsinuate
Please paste your AndroidManifest.xml (update your question with the contents of AndroidManifest.xml).Beforetime
AndroidManifest.xml looks ok. Can you paste the relevant parts of strings.xml?Beforetime
This is quite weird. I have no idea why its not reflecting. Make sure you are doing clean build and uninstall-reinstall the application.Beforetime
Me neither! I have observed the same in popular e-mail client, K9.Insinuate
E
5

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">
Edrisedrock answered 27/7, 2011 at 9:38 Comment(13)
<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>Insinuate
i think there may be problem with variable app_name change it from folder res/values/strings.xml>app_name=YourAppNameFastness
@Insinuate Hi.. Can you remove/uninstall app from ur emulator/phone and give a clean build and install it again!! Your menifest file looks good!!Edrisedrock
@Edrisedrock 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.Insinuate
@Edrisedrock 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.Insinuate
@Insinuate 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.Edrisedrock
@Edrisedrock That is a small application I developed. You can try with any of the apk files.Insinuate
@Insinuate 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!!Edrisedrock
@Edrisedrock 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!Insinuate
@Insinuate 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?Edrisedrock
@Edrisedrock Were you able to reproduce the above screen?Insinuate
@Insinuate ..no as i could not find that AppEdrisedrock
@Edrisedrock It is one of the popular applications in android market. Search for 'Astro file manager' in the market!Insinuate
T
1

in your activity

this.setTitle("your text");

this works for me

Technocracy answered 22/11, 2016 at 14:49 Comment(0)
S
1

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.

Sheatfish answered 22/12, 2019 at 3:23 Comment(0)
F
0

Within a Kotlin based android app you may search for the file: \app\build.gradle.kts and change: app_name string

After changing "app_name" to your needs, you must "Sync" the project (Click in Android Studio on top,right)

Fusee answered 30/10, 2022 at 7:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.