Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change AndroidManifest in runtime?

Is it possible to change AndroidManifest.xml in runtime programatically? If it is possible, how can I change the following programatically int he AndroidManifest while running app?

android:configChanges="orientation|keyboardHidden"

like image 499
MCA09020 Avatar asked Oct 13 '12 05:10

MCA09020


People also ask

How do I change AndroidManifest XML?

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.

What is the extension for the AndroidManifest file?

Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set.

Where is the AndroidManifest XML file located?

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.


1 Answers

No - it's not possible to change the Android AndroidManifest.xml in runtime.
But, you CAN do changes in runtime programatically - see here (look for onConfigurationChanged).

like image 147
Nir Alfasi Avatar answered Sep 19 '22 13:09

Nir Alfasi