1

How I can dynamically get android:name from <application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:name="here custom path to java file from patch" android:debuggable="true" android:allowBackup="true" android:resizeableActivity="true">(in manifest) using Java?

Nevidimka
  • 25
  • 4
  • Application his name gets from strings.xml resource file, so you can simply get it using `getString(R.string.app_name)` – grabarz121 Aug 17 '18 at 12:20
  • Possible duplicate of [Android: Get application name (not package name)](https://stackoverflow.com/questions/11229219/android-get-application-name-not-package-name) – Blasanka Aug 17 '18 at 12:44

1 Answers1

2

You can get the app name like this:-

 String appName =  getApplication().getApplicationInfo().name;
Sachin Rajput
  • 4,326
  • 2
  • 18
  • 29
KgaboL
  • 130
  • 5