cross platform mobile app development

16
Cross Platform Mobile App Development With Jakir Hossain

Upload: jakir-hossain

Post on 06-May-2015

1.157 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Cross Platform Mobile App Development

Cross Platform Mobile App Development

With Jakir Hossain

Page 2: Cross Platform Mobile App Development

Some Cross Platform Mobile App Development Tools

• RhoMobile• Appcelerator• WidgetPad• PhoneGap• MoSync

• Sencha• Webapp-net• MotherApp• Marmalade• Volantis mobility

server

Page 3: Cross Platform Mobile App Development

• Web approach using hybrid model (Combines native development with web technology.)

• HTML 5, CSS 3, JavaScript running on a mobile browser embedded in a native app wrapper.

• Device capabilities accessed through device-independent JavaScript API.

• Simple ‘drop-in libraires’ concept makes it easier to develop.

PhoneGap

Page 4: Cross Platform Mobile App Development

•Two ways of creating• ‘Drop-in libraires’

• Comand Line Interface

New PhoneGap Project

Page 5: Cross Platform Mobile App Development

• Create an android project• File -> New -> Android Project

• In the root directory of the project, create two new directories

• /libs and /assets/www

• Copy phonegap.js from your PhoneGap download earlier to /assets/www

• Create an index.html file in /assets/www

• Copy cordova.jar from your PhoneGap download to /libs

• Copy xml folder from your PhoneGap download to /res

PhoneGap Project – Drop-in Library

Page 6: Cross Platform Mobile App Development

• Make a few adjustments to the project's main Java file• Change the class's extend from Activity to DroidGap

• Replace the setContentView() line with super.loadUrl(Config.getStartUrl());

• Add import com.phonegap.*

• Remove import android.app.Activity

New PhoneGap Project (cont.)

Page 7: Cross Platform Mobile App Development

Hello World PhoneGap

Page 8: Cross Platform Mobile App Development

• Lets make our "Hello World, PhoneGap!" application• Till now we have an empty PhoneGap project

• All we need to do is to edit the index.html file• Created by us• Located in /assets/www• This is the Entry point of our Application

Hello World PhoneGap

Page 9: Cross Platform Mobile App Development

Hello World PhoneGap – Example

Hello World, PhoneGap!• Open the index.html and copy the following

<!Doctype html><html><head> <title> First PhoneGap Application </title><head><body> <h1>Hello PhoneGap</h1></body></html>

Go to Build -> Run as Android Application The emulator should start

And the app run!

Page 10: Cross Platform Mobile App Development

LIVE DEMO

Hello World PhoneGap

Page 11: Cross Platform Mobile App Development

• Creating a Project:$cordova create hello com.example.hello “HelloWorld”

• Add Platform:$cordova platform add android 

• Build / Run$cordova build  

PhoneGap Comanline Interface

Page 12: Cross Platform Mobile App Development

• http://tech.jakir.me/1395

PhoneGap Comanline Interface Setup

Page 13: Cross Platform Mobile App Development

• Jqwidgets

• Kendo UI

• jQuery Mobile

• webix

User Interface for HTML5 App

Page 14: Cross Platform Mobile App Development

• WebGL (OpenGL ES 2.0 for the Web)http://www.chromeexperiments.com/webgl/

• Quintus http://html5quintus.com/

• ImpactJShttp://impactjs.com/

• LimeJShttp://www.limejs.com/

• melonJShttp://melonjs.org/

• cocoonjs

Want to develop Games?

Page 15: Cross Platform Mobile App Development

Need to know JavaScript

Page 16: Cross Platform Mobile App Development

Questions?