Skip to content

soundasleep/cordova-tictactoe

Repository files navigation

cordova-tictactoe

A simple application that uses the Apache Cordova project to wrap a Javascript TicTacToe game as a native Android app.

Screenshot

Installing

  1. Install a JDK and required build tools: sudo apt-get install openjdk-7-jdk ant
  2. Install cordova locally from package.json: npm install
  3. Define your ANDROID_HOME in your ~/.bashrc e.g. export ANDROID_HOME=~/.local/share/android-sdk-linux
  4. Install the web application dependencies: cd wwwsrc && npm install
  5. Install the Gem to compile SASS scripts: cd wwwsrc && gem install sass

Internally we use the jstictactoe web application imported directly into this project.

Building the Android app

ant build

Alternatively you can execute both Grunt and Cordova build separately, based on the Cordova Command Line Interface:

cd wwwsrc
grunt build
cd ..
node_modules/.bin/cordova build

Testing on a local Android device

Make sure that you can run/debug Android devices through e.g. the Eclipse ADT, by setting USB debugging mode to "on" etc.

ant run

Alternatively you can execute both Grunt and Cordova build separately, based on the Cordova Command Line Interface:

cd wwwsrc
grunt build
cd ..
node_modules/.bin/cordova run android

Defining a new Cordova platform

Based on the Cordova Command Line Interface

  1. node_modules/.bin/cordova platform add android
  2. Check in all files: "it is mostly build product but some things like the AndroidManifest.xml you will end up tweaking manually"

About

A Cordova application implementing Tic Tac Toe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published