Giter Club home page Giter Club logo

phonegap-android's Introduction

PhoneGap/Android

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

Pre Requisites

Install

Add PhoneGap/Android to your PATH variable like so:

export PATH=$PATH:~/phonegap-android/bin

DroidGap: PhoneGap/Android Dev Script

Useful utilities for developers building mobile apps using PhoneGap for Android.

Usage:

droidgap [command] [parameters]

Commands:

help ... See this message. Type help [command name] to see specific help topics.
gen .... Generate an example PhoneGap application to current directory.
pkg .... Creates an Android compatible project from a www folder. Careful, this clobbers previous packaging.
run .... Installs a valid PhoneGap Project to first device found.
log .... Attach a logger that listens for console.log statements.
ship ... Build and sign an APK suitable for submission to an Android Marketplace.

Quickstart:

    $ droidgap gen example 
    $ cd example
    $ droidgap run

Launch your app and start a logger with:

    $ droidgap log

DroidGap with JRuby

If you want to use the droidgap command but do not want to install Ruby then you can call it using jruby jar included in the lib folder. All the options are the same and a call looks like this:

java -jar jruby-complete-1.4.0RC1.jar ../bin/droidgap help run

Keep in mind this will be slower due to JVM warmup.

Importing a PhoneGap/Android app into Eclipse

  1. File > New > Project...
  2. Android > Android Project
  3. Create project from existing source (point to the generated app). This should import the project into Eclipse. Almost done!
  4. Right click on libs/phonegap.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).

Common Command Line Tasks

Running Mobile Spec

TODO need content here

Compile an APK

Converting a W3C Widget into a an APK

$ ./droidgap

List devices attached

$ adb devices 
List of devices attached 
0123456789012	device

Install APK onto device

$ apk -s 0123456789012 install phonegap.apk

Logging

Via console.log calls from your apps javascript.

$ adb logcat

Debugging

Attach it to a process on the device

$ adb jdwp
adb forward tcp:8000 jdwp: jdb -attach localhost:8000

For more info see

phonegap-android's People

Contributors

arenzi avatar brianleroux avatar fredgrott avatar imnaseer avatar jonathanstark avatar rayvahey avatar sintaxi avatar thorsten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.