I want to read the debug state in the Android manifest file and then fire off a method or not based on that state. I see you can read the XML file and parse it but that way seems not that elegant. Is there another way, is that information of whats in the Manifest stored in a Java object somewhere?
<application android:name=".MyActivity" android:icon="@drawable/myicon"
android:label="@string/app_name" android:debuggable="true">
Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.
When you build an Android app by using Quantum Visualizer, an AndroidManifest. xml file is created in the app's corresponding dist folder. The file is located at WorkspaceName>/temp/<AppName>/build/luaandroid/dist.
The AndroidManifest. xml file contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers etc.
Open your Android project and go to <AppProjectFolder>/app/src/main/. Open the app manifest file AndroidManifest. xml and add the following lines to the file as child elements of the <manifest> element. Note: You must include the QUERY_ALL_PACKAGES permission if your app targets Android 11 (API Level 30) or higher.
boolean DEBUGGABLE = (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With