phone gap

15
AMERICAN INTERNATIONAL UNIVERSITY - BANGLADESH ( AIUB ) A presentation on PhoneGap Group Member : 1. Kawser, Md. Ali (09-12744- 1) 2. Maruf, Nazmul Ahasan (09- 13098-1)

Upload: ali-dany

Post on 09-May-2015

456 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Phone gap

AMERICAN INTERNATIONAL UNIVERSITY - BANGLADESH

( AIUB )

A presentation on PhoneGap

Group Member :

1. Kawser, Md. Ali (09-12744-1)

2. Maruf, Nazmul Ahasan (09-13098-1)

Page 2: Phone gap

What is PhoneGap ? PhoneGap is a HTML5 application framework that is used to develop

native applications through web technologies. That means that developers can develop smartphone and tablet application with their existing knowledge of HTML, CSS and javascript, with PhoneGap developers don’t need to learn languages like objective c. Application are developed by using phonegap are hybrid applications. Applications are not purely HTML/JavaScript based, nor are they native. The UI, the application logic and communication with a server are mainly based on HTML/JavaScript. Other part of the applications that communicates and controls the device is based on the native language for that platform. Actually phoneGap provides a bridge from the JavaScript world to the native world of the platform, which gives permission to the JavaScript API to access and control the device.

Page 3: Phone gap

PhoneGap is 100% open source, and also goes by the Apache name “Cordova”.

PhoneGap can be used to build applications that target multiple platforms, including Apple iOS, Google Android, Windows Phone, BlackBerry, HP WebOS, Symbian, and Bada.

Page 4: Phone gap

Why should we use PhoneGap?

PhoneGap is a library for building out mobile phone applications.

Simply put, building apps with PhoneGap allows to re-use existing skill sets without having to learn new stuff. 7

Basically good objective c and other language developers are expensive and had to find . But in PhoneGap framework there is no need any type of developers .

PhoneGap framework is compatible in diffenent types of device .

Page 5: Phone gap

How do get Started in PhoneGap ?

Getting started in PhoneGap is very easy . In 90% of a PhoneGap application, all we need is a text

editor. Some views of “getting started” guides for all application

platforms at the links below:

iOS: http://phonegap.com/start#ios-x4

Android: http://phonegap.com/start#android

BlackBerry: http://phonegap.com/start#blackberry

Windows Phone: http://phonegap.com/start#wp

WebOS: http://phonegap.com/start#webos

Symbian: http://phonegap.com/start#symbian

Page 6: Phone gap

PhoneGap applications are written with HTML, CSS, and JavaScript and its debug in a desktop web browser like - Chrome, IE, Firefox, Opera and Safari .

Page 7: Phone gap

How PhoneGape framework work with andriod ?

For Andriod , set up development environment for CORDOVA .

1 . Requirements:

Eclipse 3.4+

2 . Install SDK + Cordova:

- Download and install Eclipse Classic- Download and install Android SDK- Download and install ADT Plugin- Download the latest copy of Cordova and extract its contents. It will

be working with the Android directory.

Page 8: Phone gap

3 . Setup New Project:

Launch Eclipse, and select menu item New > Android Project. Fill out the three panels of the New Android Project wizard shown below -

Page 9: Phone gap

In the root directory of your project, create two new directories:

/libs

assets/www Copy cordova-1.8.0.js from your Cordova download earlier to

assets/www Copy cordova-1.8.0.jar from your Cordova download earlier to /libs Copy xml folder from your Cordova download earlier to /res

Page 10: Phone gap

Verify that cordova-1.8.0.jar is listed in the Build Path for your project. Right click on the /libs folder and go to Build Paths/ > Configure Build Path.... Then, in the Libraries tab, add cordova-1.8.0.jar to the project. If Eclipse is being temperamental, you might need to refresh (F5) the project once again.

Page 11: Phone gap

Edit your project's main Java file found in the src folder in Eclipse:○ Add import org.apache.cordova.*;○ Change the class's extend from Activity to DroidGap○ Replace the setContentView() line with

super.loadUrl("file:///android_asset/www/index.html");

Page 12: Phone gap

Right click on AndroidManifest.xml and select Open With > XML Editor

Paste the following permissions between the <uses-sdk.../> and <application.../> tags.

Support orientation changes by pasting the folowing inside the <activity> tag.

Page 13: Phone gap

AndroidManifest.xml file should look like

Page 14: Phone gap

4. Hello World: Create and open a new file named index.html in the assets/www

directory. Paste the following code:

5. Deploy to Simulator and Device :○ Right click the project and go to Run As > Android Application○ Eclipse will ask you to select an appropriate AVD. If there isn't one, then

you'll need to create it.○ Make sure USB debugging is enabled on your device and plug it into

your system. (Settings > Applications > Development)○ Right click the project and go to Run As > Android Application

DONE!

Page 15: Phone gap

Thank You