Actually, the question arose how to rename the android application when it is already running on the device by the user, i.e. allow the user to specify an arbitrary name for the application?

    2 answers 2

    If you are talking about what is specified in the manifest using android:label="@string/app_name" , then the answer is no way. It is available only for reading.

    But maybe you just want to change the name in the title of activit? then it is simply done using the setTitle() method.

    • Yes, exactly what is specified in the manifest. Those. in the resource files nothing can be changed from the code? - romanew
    • No way - they are available only for reading. - KoVadim
    • Wait, how did the Avast developers do this? Who installed their "anti-theft", he knows that during the installation, you could specify your own name for this application. - Lucky_spirit
    • I don’t know how the Avastovskiy Anti-Theft lives there (although such programs don’t belong on the phone), but I suspect that it simply downloads the correct small apk from the site, which in fact is a launcher. Or simply launches another program that "patches" the original. But here there is a problem that you will need to have a certificate to sign. Fans of writing antiviruses are known to love to spit on all standards and sometimes go deeper than viruses. - KoVadim
     @string/appname=res/values/strings.xml/appname-название