To obtain the information stated in the element meta-date use the field Metadata class Packageiteminfo.
If you have the following <meta-data>
<meta-data android:name="api_key" android:value="chave123" />
the next code will place 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());
}