Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 2.08 KB

README.md

File metadata and controls

77 lines (45 loc) · 2.08 KB

Snapmobile Box

Android for Snap! project http://snap.berkeley.edu

Thanks to https://github.com/Gubolin

More info: jmoenig/Snap#575

Vagrant configuration for Android based on https://github.com/driftyco/ionic-box

Installation

To install, download and install Vagrant for your platform, then download and install VirtualBox.

Once Vagrant and VirtualBox are installed, you can download the latest release of this GitHub repo, and unzip it. cd into the unzipped folder and run:

$ vagrant up
$ vagrant ssh

The username for vagrant is vagrant and the password is vagrant.

This will download and install the image, and then go through the dependencies and install them one by one. vagrant ssh will connect you to the image and give you a bash prompt. Once everything completes, you'll have a working box to build your apps on Android.

Usage

After installed

Test build, at guest machine:

$ cd /vagrant/
$ ./build_android.sh snap_mobile_demo.xml

Copy CordovaApp-debug.apk from snapmobile-box to Android.

Common workflow:

  1. Start Snap! - folder snapmobile-web - in shared folder, from host-machine start snap.html
  2. Create Snap! project, save as Shift+FileOpen - Save to disk (for example snap_project.xml)
  3. Copy snap_project.xml to snapmobile-box folder
  4. At guest machine:
$ cd /vagrant/snapmobile-web
$ ./build_android.sh snap_project.xml

Copy CordovaApp-debug.apk from snapmobile-box to Android.

Landscape

Edit config.xml at ~/source-origin/snapmobile add:

<preference name="Orientation" value="landscape" />

Access Snap project from internet

This give possibility to update APK's Snap-project without build/reinstall apk.

Build APK like follow:

$ ./build_android.sh URL_TO_XML

Where URL_TO_XML - is URL to your Snap project.xml file.

In folder apps - ther is simple application to distribute *.xml snap files for Android application. See README.md there for details.