How can I change the AndroidManifest.xml file in Meteor?
I need to add a couple of events to the Meteor Cordova project, namely:
android:windowSoftInputMode="adjustPan"
and android:configChanges="orientation|keyboardHidden"
App.setPreference
doesn't seem to work for Activities in mobile-config.js
and App.setActivity
doesn't seem to exist.
Documents mobile-config.js
are available here .
Is there a way to do this now?
source to share
The AndroidManifest.xml file can be edited directly and doesn't seem to get deleted on build.
The file is located in: .meteor/local/cordova-build/platforms/android
From there, activities can be added directly to the main activity.
I'm still trying to find a way to get it to work when ported to another server since the .meteor folder is not included.
source to share
I'm pretty sure what you need to do here . Basically you need to do
-
Create a config.xml file in the cordova-build-override / folder in your project.
-
Copy the main config.xml file created when creating the new Cordova project.
-
Add to
to your config.xml:
<application
android:windowSoftInputMode="adjustPan"
android:configChanges="orientation|keyboardHidden" />
- Make sure you have this
in your widget tag for android to be available:
xmlns:android="http://schemas.android.com/apk/res/android"
- Use App.setPreference and so on to set common details.
And yes, I know this is pretty hacky, but it makes sense since Meteor uses Cordova internally and only has such "normal" config.xml options.
source to share