Dmitry  Kononov
Dmitry Kononov

Reputation: 5

How to rename APP after install on Android

please help me.

How i can rename app programmatically after install on Android? For example, i am launch in App with name "TEST", press special button and this APP change name to "test2".

Upvotes: 0

Views: 646

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006564

That is not possible, as you cannot change the android:label attribute on <application> at runtime.

If you are looking to change the launcher icon, you can try to do this by having two launcher activities, one initially with android:enabled="false". Then, at runtime, use PackageManager and setComponentEnabledSetting() to disable your original launcher activity and enable the one that you shipped in a disabled state. However, on some devices, this will require a reboot to take effect, because the home screen might not be paying attention to this sort of state change. And note that this only affects the launcher icon, not the app's name shown in Settings or anywhere else in the system that uses the application's label instead of an activity's label.

Upvotes: 1

Related Questions