ManifestMetadata

class ManifestMetadata

The ManifestMetadata class simplifies the retrieval of meta-data values from AndroidManifest.xml

Meta-data is stored as key-value pairs.

<meta-data
     android:name="KEY"
     android:value="VALUE" />

Fields

KEY_APPKEY

static final String KEY_APPKEY

KEY_DEV_ID

static final String KEY_DEV_ID

Constructors

ManifestMetadata

ManifestMetadata(Context context)

Methods

getPackageName

String getPackageName()

Gets the package name of the currently executing application

Returns:package name

getString

String getString(String key, String defaultValue)

Gets the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associated with the given key

Parameters:
  • key – a String, or null
  • defaultValue – Value to return if key does not exist or if a null value is associated with the given key
Returns:

the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that key.