To get the information declared in the meta-data element use the field metaData of class PackageItemInfo .
If you have the following <meta-data>
<meta-data android:name="api_key" android:value="chave123" />
The following code will put in the string apiKey
the value "chave123"
try {
PackageItemInfo packageInfo = getPackageManager().getApplicationInfo(getPackageName(),
PackageManager.GET_META_DATA);
Bundle bundle = packageInfo.metaData;
String apiKey = bundle.getString("api_key");
} catch (PackageManager.NameNotFoundException e) {
Log.e("MetaData", "Erro ao ler meta-data, NameNotFound: " + e.getMessage());
} catch (NullPointerException e) {
Log.e("MetaData", "Erro ao ler meta-data, NullPointer: " + e.getMessage());
}