phonegap lab

17
LeoNguyen.com

Upload: leo-nguyen

Post on 10-May-2015

354 views

Category:

Technology


0 download

DESCRIPTION

PhoneGap Lab http://leonguyen.com

TRANSCRIPT

Page 2: PhoneGap Lab

Outline

- References (bit.ly/1laDLjV)

- Lab 01: An introduction to PhoneGap

Page 3: PhoneGap Lab

Lab 01

An introduction to PhoneGap

Page 4: PhoneGap Lab

Outline

- Download and install

- Configure the project

- Write a Hellworld program

Page 5: PhoneGap Lab

Exercise 1

Download and install

Page 6: PhoneGap Lab

Overview

Page 7: PhoneGap Lab

Task 1 - Download

- Goto download site http://phonegap.com/install/

Page 8: PhoneGap Lab

Exercise 2

Configure the project

Page 9: PhoneGap Lab

Task 1: Create ‘www’ folder

- Create the ‘www’ folder under assets folder.

Page 10: PhoneGap Lab

Task 2: Copy PhoneGap libraries

- Copy ‘cordova.js’ and ‘cordova.js’ to Android project.

Page 11: PhoneGap Lab

Exercise 3

Write a Helloworld program

Page 12: PhoneGap Lab

Task 1: Create index.html

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

Page 13: PhoneGap Lab

Task 2: Add to Build Path

- Right click on ‘cordova.jar’ then select Add to Build Path

Page 14: PhoneGap Lab

Task 3: Update Activity class

- Enter code: gist.github.com/leonguyen/7036322

Page 15: PhoneGap Lab

Task 4: Configure the project metadata

- Enter code: gist.github.com/leonguyen/7036370

Page 16: PhoneGap Lab

Task 4: Configure the project metadata (2)

Page 17: PhoneGap Lab

Task 5: Run

- Choose "Run As" > "Android Application".