Go to file
Marcel Kinard b895a0c335 CB-5346 Fix and cleanup broken Android unit test
- Found stale cordova.js in the test project. Changed ant script to copy in
  a fresh one in the pre-build stage. Removed stale copies from git, added
  to .gitignore. This is what was causing the test failure when sending
  javascript to the webview.
- Found almost-stale copy of device plugin, did the same as above.
- Fixed spacing in log messages in CordovaWebView.
- Updated README.md with current information.
- Removed dollar signs that were previously accidently appended to the license.
- Added cordova version to html pages, next to the other metadata.
- Fix incorrect separator in the viewport meta tag.
- Changed old-style <log> tag to <preference name="loglevel"> in config.xml.
- In BackButtonMultiPageTest, increased the TIMEOUT so the deviceready event
  can trigger the referenced javascript, improved the setup() method to
  explicitly load the starting point.
2013-11-11 16:19:01 -05:00
bin Set VERSION to 3.3.0-dev (via coho) 2013-11-06 15:06:19 -08:00
framework CB-5346 Fix and cleanup broken Android unit test 2013-11-11 16:19:01 -05:00
test CB-5346 Fix and cleanup broken Android unit test 2013-11-11 16:19:01 -05:00
.gitignore CB-5346 Fix and cleanup broken Android unit test 2013-11-11 16:19:01 -05:00
.reviewboardrc Add a .reviewboardrc file to make using post-review easier. 2013-05-21 12:35:47 -04:00
LICENSE CB-3: Apache source headers in callback-android 2012-02-23 11:36:08 -05:00
NOTICE Updating notice because okhttp is part of the AOSP 2013-04-29 10:57:00 -07:00
README.md Updating README.md to have latest Android SDK 2013-09-26 14:35:00 -07:00
RELEASENOTES.md Remove a couple incorrect lines from RELEASENOTES.md 2013-10-01 15:13:07 -04:00
VERSION Set VERSION to 3.3.0-dev (via coho) 2013-11-06 15:06:19 -08:00

Cordova Android

Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript.

Apache Cordova is a project at The Apache Software Foundation (ASF).

Requires

Cordova Android Developer Tools

The Cordova developer tooling is split between general tooling and project level tooling.

General Commands

./bin/create [path package activity] ... create the ./example app or a cordova android project
./bin/check_reqs ....................... checks that your environment is set up for cordova-android development
./bin/update [path] .................... updates an existing cordova-android project to the version of the framework

Project Commands

These commands live in a generated Cordova Android project. Any interactions with the emulator require you to have an AVD defined.

./cordova/clean ........................ cleans the project
./cordova/build ........................ calls `clean` then compiles the project
./cordova/log   ........................ stream device or emulate logs to stdout
./cordova/run   ........................ calls `build` then deploys to a connected Android device. If no Android device is detected, will launch an emulator and deploy to it.
./cordova/version ...................... returns the cordova-android version of the current project

Importing a Cordova Android Project into Eclipse

  1. File > New > Project...
  2. Android > Android Project
  3. Create project from existing source (point to the generated app found in tmp/android)
  4. Right click on libs/cordova.jar and add to build path
  5. Right click on the project root: Run as > Run Configurations
  6. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to)

Building without the Tooling

Note: The Developer Tools handle this. This is only to be done if the tooling fails, or if you are developing directly against the framework.

To create your cordova.jar file, run in the framework directory:

android update project -p . -t android-18
ant jar

Running Tests

Please see details under test/README.md.

Further Reading