Hey Ludo, this is a huge PITA to figure out, but I can conform it does actually work for Android.
If you haven’t already, start here: https://github.com/meteor/meteor/wiki/Meteor-Cordova-integration
On the right of the wiki are “Pages (47)” also expand that, and read everything there too.
Bottom line, you’ll have to do alot of work and reasearch. The tutorial page glosses over alot of the complexity.
Yes, you can run the app locally. Either in a browser, or on a phone pointed to localhost, or on a phone pointed to a public server.
Configure you app’s
App.accessRule('*'); (Google it)
If you get stuck, look in github for issues. There are some unresolved bugs out there, that look like the App.accessRule() issue.
I have these bash scripts in my phone app folder for testing:
# Run in browser
meteor run --settings settings.json
# Run on USB attached phone (you need Android SDK. google it)
meteor run android-device --settings settings.json
# Run app on USB attached phone pointed to deployed "staging" server
meteor run android-device \
--settings ./stage-settings.json \
--mobile-server https://stage.example.com:443 \
# Build APK to put in Play store. 'android' is a build directory
meteor build android \
--mobile-settings prod-settings.json \
--server https://prod.example.com:443 \
# Your apk may be somewhere else. This is for crosswalk
cp android/project/build/outputs/apk/android-armv7-release-unsigned.apk ./release-unsigned.apk
# Sign the APK (google it)
jarsigner -verbose \
-keystore ./keystore \
-storepass keystorePass \
-sigalg SHA1withRSA \
-digestalg SHA1 \
# This may break. Run android sdk installer to get tools (google it)
rm -f release-signed.apk
$ANDROID_HOME/build-tools/23.0.2/zipalign 4 release-unsigned.apk release-signed.apk
# Upload to the play store