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
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.
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:
- Start Snap! - folder
snapmobile-web
- in shared folder, from host-machine startsnap.html
- Create Snap! project, save as Shift+FileOpen -
Save to disk
(for examplesnap_project.xml
) - Copy
snap_project.xml
tosnapmobile-box
folder - At guest machine:
$ cd /vagrant/snapmobile-web
$ ./build_android.sh snap_project.xml
Copy CordovaApp-debug.apk
from snapmobile-box
to Android.
Edit config.xml
at ~/source-origin/snapmobile
add:
<preference name="Orientation" value="landscape" />
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.