Change app name - android

note: I read the former post about changing app name. The label of my app should be correct, still it is not.
I have an android app that I made.
It consists of different activities.
But when I downloaded my app, it is called "Sign in". This should not be the case, I want it to be called something else. How can I achieve this?
Here is my manifest file:
....
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
and my strings file:
<resources>
<string name="app_name">Exigentia</string>
<string name="action_settings">Settings</string>
<string name="EmergencyButton">EmergencyButton</string>
<string name="title_activity_login">Sign in</string>
<!-- Strings related to login -->
<string name="prompt_email">Email</string>
<string name="prompt_password">Password (optional)</string>
<string name="action_sign_in">Sign in or register</string>
<string name="action_sign_in_short">Sign in</string>
<string name="error_invalid_email">This email address is invalid</string>
<string name="error_invalid_password">This password is too short</string>
<string name="error_incorrect_password">This password is incorrect</string>
<string name="error_field_required">This field is required</string>
<string name="permission_rationale">"Contacts permissions are needed for providing email
completions."
</string>
</resources>
So why does my app display "Sign in" as its name, and not Exigentia?
Note: this is before I click my app and launch it. Once it is launched, the sign in should be there in the top

According to the App Manifest's <activity> label attribute:
A user-readable label for the activity. The label is displayed on-screen when the activity must be represented to the user. It's often displayed along with the activity icon.
If this attribute is not set, the label set for the application as a whole is used instead (see the <application> element's label attribute).
An application can have multiple entry points represented by multiple activites. For example, you want to create an application that has both a teacher and a student entry points on the user's phone without requiring them to install multiple apps. This also means that you can assign different labels to the activites, like Teacher and Student, respectively.
Basically, when you create an app with a single main Activity, you just place the app name on the <application> tag and the icon in the main menu will have that label. Obviously for multiple Activity entry points this would not be great, so you have the option to override it one-by-one.
I think you want to achieve that the label be displayed on the app bar (action bar, toolbar, you name it). This should be done by either putting the label onto the app bar in the layout XML or using code, such as getSupportActionBar().setTitle(R.string.title_activity_login);.

Do you have translations in your app? This could be the problem because android displays the local strings if exists. If you have translations, make sure you have changed the app_name string in all strings.xml files. Guaranteed way to make sure if you have translations is that go to your project directory and see if there are multiple "values" folders under "...\app\src\main\res" like "values-en", "values-de" etc.

No need to put label in all activity Tags. Try below one:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Related

Change icon of activity in my application specific to share

I implement an app in which is one Activity designed for sharing text. Everything works fine, text is sharing etc. But if I would like to share some text, executing share action offered some applications which can handle sharing text. There is my application but shown icon is not equal of default ic_launcher. How can I change icon of my app when system offers me apps which can handle sharing text?
thanks.
you can change your app in manifest file..
<application
android:icon="#drawable/ic_launcher" //---- here--put your new icon in drawable folders and change it here
android:label="#string/app_name" // same thing.. change your app name in string.xml file.. then, here app name will change automatically....
android:theme="#style/AppTheme" >
<activity
android:name=".ui.MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
try this..
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Setting Application Name in Android Devices

I implemented a android project named 'vignesh', in which i had source package as com.example.learn.android. In my tab while uninstalling the app, its showing com.example.learn instead of project name alone. Please advice..
You can specify your application label in the AndroidManifest.xml
<application
android:label="#string/app_name"
...>
</application>
In the above example you have to define app_name in res/strings.xml
<string name="app_name">My app name</string>
If this is not working in the AndroidManifest.xml file:
<application
android:label="#string/app_name"
...>
</application>
Look for the startup activity(the activity with the android.intent.action.MAIN & android.intent.category.LAUNCHER), example:
<activity
android:name=".SplashScreen"
android:label="com.example.learn"
android:noHistory="true"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You probably have the android:label mentioned just like the example above. The strange thing is that Android takes your first activity's name (label) as app name (I don't know why).
If you just remove (or rename) the android:label="com.example.learn" line it should be ok. Removing the line ensures that the app will look for the android:label tag defined in the <application> part of the AndroidManifest.xml file.

Setting app name in application label isn't working [duplicate]

This question already has answers here:
How to set different label for launcher rather than activity title?
(8 answers)
Closed 10 years ago.
So I've got an Android App with an generated Login Screen (the one you can directly create from Eclipse). That's working.
The problem is this:
I've set the Login screen to be the Launcher activity. This works. Unfortunately the App is then called as the label parameter of the login activity. Meaning the android:label value of the application is simply ignored.
Here's my code as my question sounds quite vague:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" <!-- the app name i want it to have -->
android:theme="#style/AppTheme" >
<activity
android:name="com.test.testytest.MainActivity"
android:configChanges="orientation"
android:label="#string/app_name" >
</activity>
<!-- some more activities -->
<activity
android:name="com.test.testytest.LoginActivity"
android:label="#string/title_activity_login" <!-- the name the app is called in the drawer etc. -->
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
strings.xml:
<string name="app_name">Testy Test!</string>
strings_activity_login:
<string name="title_activity_login">Sign in</string>
When I change the string of the Login activity to app_name, the name of the app changes, too. But I'm quite sure that the app should be called as defined in android:label in
Hope you can help me or point me to my mistake (maybe I'm just missing a little detail).
A little Edit: I don't want to change the label of my Login activity as it should remain "Login". And it also should stay the first activity to be called. But the App Name in the drawer should be the one defined in .
Thanks to Geobits:
Here's the solution How to set different label for launcher rather than activity title?
Solution found!
Apparently the "intent-filter" can have a label attribute. If it's absent
the label is inherited from the parent component (either Activity or
Application). So using this, you can set a label for the launcher
icon, while still having the Activity with it's own title.
http://developer.android.com/guide/topics/manifest/intent-filter-element.html
android:label="#string/title_home_activity"
android:icon="#drawable/icon">

How to change an Android app's name?

Is there a way to change the name (Launcher App Label) of an app without creating a new project?
Note: Name of the App and The label shown on the Launcher Icon on Home Screen on Mobiles can be different.
Example: On the home page in my Mobile where my apps are, I have an icon and the name Foo, but I want to change the name to Bar. Can I do this?
Yes you can. By changing the android:label field in your application node in AndroidManifest.xml.
Note: If you have added a Splash Screen and added
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash_screen"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
to your Splash Screen, then the Launcher Icon name will be changed to the name of your Splash Screen Class name.
Please make sure that you change label:
android:label="#string/title_activity_splash_screen"
in your Splash Screen activity in your strings.xml file. It can be found in Res -> Values -> strings.xml
See more here.
There's the android:label for the application, and the android:label for the launch activity. The former is what you see under Settings -> Applications -> Manage Applications on your device. The latter is what you see under Applications, and by extension in any shortcut to your application, e.g.
<application
android:label="#string/turns_up_in_manage_apps" >
<activity
android:name=".MainActivity"
android:label="#string/turns_up_in_shortcuts" >
...
</activity>
</application>
This is a simple thing in Android Studio,
go to: res folder -> values -> strings.xml
change the app_name (in the bellow example:MitsuhoSdn Bhd) to any new name you want.
<string name="app_name">MitsuhoSdn Bhd</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
I noticed there are some differences in how the app name can turn up in Lollipop devices. Before Lollipop, you can have different app names with this:
<application
android:label="#string/app_name"> // appears in manage app info
<activity
android:name=".MainActivity"
android:label="#string/action_bar_title"> // appears in actionbar title
<intent-filter android:label="#string/name_in_icon_launcher"> // appears in icon launcher
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
...
In Lollipop, it will be like this:
<application
android:label="#string/name_in_manage_app_info">
<activity
android:name=".MainActivity"
android:label="#string/name_in_actionbar_and_icon_launcher">
<intent-filter android:label="#string/this_is_useless">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
In Lollipop, android:label in intent-filter is basically useless, while actionbar title and icon launcher is identical. So, if you want a different title in actionbar, you have no choice but to set dynamically
getSupportActionBar().setTitle(R.string.app_name);
You might have to change the name of your main activity "android:label" also, as explained in Naming my application in android
It depends what you want to do. I personally wanted to rename my project so it didn't say MainActivity at the top of the app and underneath the icon on my phone menu.
To do this I went into the Android Manifest.xml file and edited
<activity
android:name=".MainActitivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And edited the android:name=".Mynewname" and then edited the string title_activity_main in the strings.xml file to match the name.
Hope that helps!
if you want to change app name under launcher icon then change this android:label="#string/app_name"
inside your Main Launcher activity tag
<activity android:name="com.test.app"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And if you want to change app name inside
Settings -> Application manager -> downloaded
where you have all installed applications then change this android:label="#string/app_name"
inside application tag
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
........
<activity android:name="com.test.app" >
</activity>
.......
</application>
To change the name of your Android application in Android Studio or Eclipse, you have to change the value of the property android:label defined inside the <application> node in AndroidManifest.xml
android:label="My Cool Application!"
by default the name of the application is referenced to a string defined in strings.xml file, for example:
android:label="#string/app_name"
so, we have to change the value inside the strings.xml file:
<string name="app_name">My Cool Application!</string>
<application
android:icon="#drawable/app_icon"
android:label="#string/app_name">
<activity
android:name="com.cipl.worldviewfinal.SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
To change android app's name , go to activity which is launcher activity and change its label like I have done above in my code.
If you're using android studio an item is under your strings.xml
<string name="app_name">BareBoneProject</string>
It's better to change the name here because you might have used this string somewhere.Or maybe a library or something has used it.That's it.Just build and run and you'll get new name.Remember this won't change the package name or anything else.
Nevermind I found it. It can be done in the manifest file under application just set the android label. Was thrown off at first becasue it didn't change my shortcut of the application's name.
Go to Strings.xml file under values.
Change the app_name tag to your app_name to want and it is all set, you will be able to see the name you change now.
follow the steps:(let I assuming you have chosen Android view)
app>res>values>strings
<string name="app_name">Put your App's new name here</string>
Edit the application tag in manifest file.
<application
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" >
Change the label attribute and give the latest name over there.
The change in Manifest file did not change the App name,
<application android:icon="#drawable/ic__logo" android:theme="#style/AppTheme" android:largeHeap="true" android:label="#string/app_name">
but changing the Label attribute in the MainLauncher did the trick for me .
[Activity(Label = "#string/app_name", MainLauncher = true, Theme = "#style/MainActivityNoActionBarTheme", ScreenOrientation = ScreenOrientation.Portrait)]
Old question but also now relative to Xamarin Android development:
As Xamarin allows for attributes to be used for adding items into the manifest, you may need to open your MainActivity.cs file and change the Label tag to your application's name:
Note: This attribute will override written android:label= tags in your manifest file as I found out whilst archiving the app ready for release so be sure to change this attribute too.
Yes Of-course........Android Supports to change the name of the App before making build just like iOS (Build Configuration).
You can change it by Modifying the Android manifest file for the project.
If you are here because when you tried to upload your fresh/brand new application using the play console it displayed this error:
"You must use another package name because "some.package.name" already exists in Google Play."
You just need to go to your build.gradle file (your application) and change
applicationId "some.package.name"
to
applicationId "some.package.different-unique-name"
Other answers here didn't fix this error.
in my case i need invalidate/cache and restart and its work
change the app string resource to your new activity

How to name Android Application

I have an Android App with 2 activities. I have the following in the AndroidManifest:
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="false">
<activity android:name=".MyCellTracker" android:label="#string/activity1_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DisplaySuccess" android:label="#string/activity2_name"></activity>
The activities are properly named, yet the application is using the project name rather than the android:label (#string/app_name) I have given it. If I go to delete the application, then I see that it is named using the android:label. Why is the name that is displayed under the icon on the program launcher not using android:label in the application node?
This may not be the answer you're looking for, but you can set the activity title using setTitle(string title).
Set the title programmatically, and set the app title in the manifest.xml using the main activity's label.
According to that reference:
http://developer.android.com/guide/topics/manifest/activity-element.html#label
it is the label of the main activity. However if you don't set a label in the activity, the label of the application is taken.

Categories

Resources