Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PhoneGap Lab

LeoNguyen.com
January 03, 2014

PhoneGap Lab

PhoneGap Lab
http://leonguyen.com

LeoNguyen.com

January 03, 2014
Tweet

More Decks by LeoNguyen.com

Other Decks in Technology

Transcript

  1. LeoNguyen.com

    View Slide

  2. Outline
    - References (phonegap.leonguyen.com/references.html)
    - Lab 01: An introduction to PhoneGap

    View Slide

  3. Lab 01
    An introduction to PhoneGap

    View Slide

  4. Outline
    - Download and install
    - Configure the project
    - Write a Hellworld program

    View Slide

  5. Exercise 1
    Download and install

    View Slide

  6. Overview

    View Slide

  7. Task 1 - Download
    - Goto download site http://phonegap.com/install/

    View Slide

  8. Exercise 2
    Configure the project

    View Slide

  9. Task 1: Create ‘www’ folder
    - Create the ‘www’ folder under assets folder.

    View Slide

  10. Task 2: Copy PhoneGap libraries
    - Copy ‘cordova.js’ and ‘cordova.js’ to Android project.

    View Slide

  11. Exercise 3
    Write a Helloworld program

    View Slide

  12. Task 1: Create index.html
    - Create the ‘index.html’ under ‘assets/www’ folder then enter
    code: gist.github.com/leonguyen/7036244

    View Slide

  13. Task 2: Add to Build Path
    - Right click on ‘cordova.jar’ then select Add to Build Path

    View Slide

  14. Task 3: Update Activity class
    - Enter code: gist.github.com/leonguyen/7036322

    View Slide

  15. Task 4: Configure the project metadata
    - Enter code: gist.github.com/leonguyen/7036370

    View Slide

  16. Task 4: Configure the project metadata (2)

    View Slide

  17. Task 5: Run
    - Choose "Run As" > "Android Application".

    View Slide