如何从<application>获取android:name

时间:2018-08-17 11:41:46

标签: java android

如何使用Java从<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">(清单中)动态获取android:name?

1 个答案:

答案 0 :(得分:1)

您可以这样获得应用名称:-

 String appName =  getApplication().getApplicationInfo().name;