PhoneGap
web-based mobile development framework, based on the open-source Cordova project. use standard web technologies such as HTML5, CSS3, and JavaScript Applications execute within wrappers targeted to each platform. Use PhoneGap if you are: – a mobile developer want to extend an application across more than one platform – a web developer and want to deploy a web app that's packaged for distribution in various app store portals. – a mobile developer interested in mixing native application components with a WebView (browser window).
Component config.xml – provides information about the app and specifies parameters affecting how it works – This file adheres to the W3C's Packaged Web App, or widget, specification. index.html – references whatever CSS, JavaScript, images, media files, or other resources are necessary for it to run. – The app executes as a WebView within the native application wrapper, which you distribute to app stores. phonegap.js (optional) – to interact with various device features the way native apps do, it must also reference a file, which provides API bindings.
Tools Node.js Phonegap/cordova Brackets Sublime Text NetBeans Eclipse Android SDK Ripple Emulator (Chrome)
Instalasi Install node.js Install module phonegap/cordova Install Java dan Apache Ant jika belum Konfigurasi Path dari Ant bin Konfigurasi JAVA_HOME dan ANT_HOME Install Git (msysgit)
Create App phonegap create hello –i com.husnil.hello –n “HelloWorld”
Directory Structure
Run on browser chrome.exe –allow-file-access-from-files
Run on Emulator
phonegap local build android phonegap run android
Eclipse ADT
Workflow Configure Development Env Create project Edit Project Open in Emulator Install on Android/iOS/WP
Plugin plugin is a bit of add-on code that provides an interface to native components. “phonegap local plugin add”
Lets Create Apps