Specify this data in the manifest via meta-data . Use this code to get the metadata from the manifest.
try { ApplicationInfo ai = getPackageManager().getApplicationInfo(activity.getPackageName(), PackageManager.GET_META_DATA); Bundle bundle = ai.metaData; String myApiKey = bundle.getString("key"); } catch (NameNotFoundException e) { Log.e(TAG, "Failed to load meta-data, NameNotFound: " + e.getMessage()); } catch (NullPointerException e) { Log.e(TAG, "Failed to load meta-data, NullPointer: " + e.getMessage()); }