I have created an meteor app, and deployed it using meteor deploy DOMAIN.
Is it possible to use my app just ‘wireless’ and everywhere, and not only when I used meteor run android-device --mobile-server DOMAIN, and while connected to the computer?
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 mobile-config.js with 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 \
--verbose
# 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 \
--verbose
# Your apk may be somewhere else. This is for crosswalk
cd android
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 \
release-unsigned.apk \
phone.example.com
# 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
It is not possible to test my app, without having it attached to my
phone, and without putting it in the play store?
Based on my experience, it is possible.
I deploy the app to a public “staging” server.
Delete the app from the phone
Connect phone via USB and run this command
# 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 \
--verbose
What’s not explained very well, but there’s a github issue about is that
when the phone is connected, it seems to get app code pushes from the dev
computer, but run against the public stage. There are alot of fiddly
pieces, so it’s alot to bite off. IMHO, there is a large gap between
marketing and documentation on this feature.
Anyways Ludo, hope this helps you Good luck with your project!