Mobile Apps with MeteorJS
My first mobile app with MeteorJS
See here. Run from command line (path does not matter):
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake android --accept-license
Start Android Studio (Applications, Programs...) and install the SDK (some hundred mega bytes...)
Close Android Studio. (You can check package under File, Settings, etc., see here.)
Set ANDROID_HOME and update path:
- sudo gedit /etc/environment
- insert
export ANDROID_HOME=/home/pfu/Android/Sdk
and extend:PATH=....::/home/pfu/Android/Sdk
Open new shell, go to your project (~/WebstormProjects/Club76-Huettenabrechnung) and enter:
- run
meteor add-platform android
- other commands:
meteor remove-platform android / meteor list-platforms
Unfortunately you run a 32 Bit Ubuntu system you probably have downloaded a too new Android SDK, see here. Downgrade by downloading zip from here. Copy the unzipped content to ~/Android/Sdk.
- Install system image:
- cd /home/pfu/Android/Sdk/tools/
- ./android sdk -> opens Android SDK Manager
- deselect all, then select 'Android 6.0' / 'Intel x86 Atom System Image', install
- select avd:
- ./android avd
- create a device suiting your needs (in my case 5' screen with 1040 x 1920 pixels)
Run with emulator
meteor run android
SINCE I AM RUNNING A 32 BIT UBUNTU SYSTEM I DID NOT MANAGE TO MAKE THAT RUN. (Running ~Android/Sdk/platform-tools/emulator -force-32bit
did not work either.)
Best resort is going 64 bit and try again...
Run on local device (Galaxy S4 in my case)
Go according this guide and here:
- Check that your smartphone has USB debugging enabled (Einstellungen, Optionen, Entwickleroptionen). (To make it available, go to Settings > About phone and tap Build number seven times.)
- Open terminal:
cd /etc/udev/rules.d/ sudo touch 51-android.rules chmod a+r /etc/udev/rules.d/51-android.rules sudo gedit 51-android.rules
- and put following code into it:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="04e8", GROUP="plugdev"
- 04e8 is for Samsung, to find out your group:
groups
- save and close gedit
- start meteor:
meteor run android-device
- in my case I had to try twice. (You can check if your device is available by:
~/Android/Sdk/platform-tools/adb devices
Here my output:
List of devices attached 54a03590 unauthorized
Then after some time the application appears on the smartphone. Don't expect it to be fast...