EX:
<application android:name=".ExampleApplication"And get value by:
android:icon="@drawable/icon"
android:label="@string/app_name">
<meta-data android:name="CustomValue"
android:value="1.0.0" />
<activity android:name="com.example.MainActivity"
...
ApplicationInfo appInfo = mContext.getPackageManager().getApplicationInfo(mContext.getPackageName(), PackageManager.GET_META_DATA);
String value = (String) appInfo.metaData.get("CustomValue");
No comments:
Post a Comment