I was wondering if it’s possible to read a value from the Android manifest file programmatically. More specifically, I was wondering if the below pseudo-code is possible.
public void DebugLog(String label, String message) {
// Display log messages only when debugging, i.e. not in the release product
if (AndroidManifest.debuggable)
Log.d(label, message);
}
Thanks
Here is how to check if the debuggable attribute is set in the manifest:
Shamelessly stolen from here:
https://stackoverflow.com/a/4277868/483708