SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Intro to PhoneGap 
Ramesh Nair / hiddentao 
Oct 2014 @ Taipei Javascript Enthusiasts
What is PhoneGap? 
• Build mobile apps using HTML5, Javascript and CSS 
• Created by Nitobi in 2008 
• Acquired by Adobe in 2011 
• Code also given to Apache to create “Cordova” 
• Today 2 projects: Phonegap and Cordova 
• If Cordova = Blink/Webkit then Phonegap = Chrome 
• PhoneGap adds extra features to Cordova (e.g. cloud build) 
• http://cordova.apache.org/ 
• http://phonegap.com/
Single codebase 
Multiple platforms 
img: http://adrocknaphobia.github.io/preso-future-of-mobile/
img: http://chelramsey.com/phonegap-vs-native-builds-a-12-month-review/
How does it work? 
HTML, Javascript, CSS 
PhoneGap Javascript API 
Web browser / UIWebView 
PhoneGap Native Library 
Native Platform 
Mobile app
Getting started 
Java-like 
package 
name 
$ npm install -g cordova 
$ cordova create ./mydemo com.mydemo MyDemo 
$ cd mydemo 
$ cordova platform add android 
$ cordova run android 
Assume 
iOS/Android 
SDK is 
setup 
Pre-requisites: Android SDK, ANDROID_HOME, ant
Folder layout 
config.xml - used to generate iOS/Android config 
hooks/ - actions to run at various points during the build 
platforms/ - apps for each platform, same as normal apps 
plugins/ - cordova/phonegap plugins which add functionality 
www/ - where your HTML, JS and CSS live 
-> platforms/android/assets/www 
-> platforms/ios/www 
-> …
Live-reload = rapid feedback 
• “The PhoneGap Developer App” 
• http://app.phonegap.com/ 
• Available from iOS and Android app stores 
• phonegap serve 
• npm install -g phonegap 
• Watches www/ folder for changes, tells page to reload itself 
• You can test this in a normal browser too 
• There is also cordova serve but not sure what it’s supposed to do
Plugins 
• Allow you to interact with the rest of your device (beyond the web 
browser) through Javascript 
• Plugins usually have 2 components: 
1. Platform-specific native layer (Android, iOS, etc) 
2. Javascript API (used by your app) 
• All standard device features (e.g. contacts, compass, etc) accessed 
through plugins 
• Can also interact with other apps (e.g. Facebook app, Google Maps) 
• Plugin registry: http://plugins.cordova.io/
Adding a plugin 
• Geolocation plugin (lat/long) 
• http://plugins.cordova.io/#/package/ 
org.apache.cordova.geolocation 
• We use navigator.geolocation.watchPosition to get 
the latitude/longitude co-ordinates. 
$ cordova plugin add org.apache.cordova.geolocation 
$ cordova run android …OR… phonegap serve
Live-reload issues 
• PhoneGap Developer App comes with basic plugins - 
geolocation, camera, etc. 
• But what if we want to use a plugin it doesn’t have, e.g. 
Google Maps or our own custom plugin? 
• We can’t use live-reload with phonegap serve… 
• …so we will build the live reload mechanism ourselves!
Live-reload issues 
• PhoneGap Developer App comes with basic plugins - 
geolocation, camera, etc. 
• But what if we want to use a plugin it doesn’t have, e.g. 
Google Maps or our own custom plugin? 
• We can’t use live-reload with phonegap serve… 
• …so we will build the live reload mechanism ourselves!
Use gulp for live-reload 
• gulp-server-livereload - watch for changes and 
send reload signal 
• gulp-replace-task - auto-insert live reload 
host:port into HTML page 
• Demo app 
• https://github.com/hiddentao/phonegap-demo-app
Useful links 
• Ionic framework - http://ionicframework.com 
• Like Twitter Bootstrap but for hybrid apps. 
• Built on Angular.JS 
• Meteor - http://meteor.com/ 
• Isomorphic Javascript framework (built on node.js) 
• Lets you push code update to clients on-the-fly 
• PhoneGap build - https://build.phonegap.com/ 
• Build and packaging done on a cloud server, saves you time and effort 
• Trigger.io - https://trigger.io/ 
• Like PhoneGap but is proprietary and costs money 
• Easier to use than PhoneGap, better plugin integration, etc.
Any Questions? 
“PhoneGap is making the world a 
better place through constructing 
elegant hierarchies for maximum 
code reuse and extensibility”

Contenu connexe

Tendances

Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapSimon MacDonald
 
PhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010alunny
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapdegarden
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapQuang Minh Dao
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSGabriel Huecas
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap InsightsMonaca
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application DevelopmentApache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Developmentthedumbterminal
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapTed Chien
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationMuhammad Hakim A
 
Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGapDotitude
 
The Phonegap Architecture
The Phonegap ArchitectureThe Phonegap Architecture
The Phonegap ArchitectureFrank Gielen
 

Tendances (20)

Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGap
 
PhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged AppsPhoneGap Day US 2013 - Chrome Packaged Apps
PhoneGap Day US 2013 - Chrome Packaged Apps
 
Phone gap
Phone gapPhone gap
Phone gap
 
PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010PhoneGap Talk @ Sencha Con 2010
PhoneGap Talk @ Sencha Con 2010
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSSCordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
 
Building mobile apps using Phonegap
Building mobile apps using PhonegapBuilding mobile apps using Phonegap
Building mobile apps using Phonegap
 
Phonegap - An Overview
Phonegap - An OverviewPhonegap - An Overview
Phonegap - An Overview
 
Phonegap
PhonegapPhonegap
Phonegap
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application DevelopmentApache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Development
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Phonegap/Cordova vs Native Application
Phonegap/Cordova vs Native ApplicationPhonegap/Cordova vs Native Application
Phonegap/Cordova vs Native Application
 
Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGap
 
The Phonegap Architecture
The Phonegap ArchitectureThe Phonegap Architecture
The Phonegap Architecture
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 

En vedette

Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...kiphampton
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
Intelligent Traffic light detection for individuals with CVD
Intelligent Traffic light detection for individuals with CVDIntelligent Traffic light detection for individuals with CVD
Intelligent Traffic light detection for individuals with CVDSwaroop Aradhya M C
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentspsstoev
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
OBIEE - Introduction & building reports
OBIEE - Introduction & building reportsOBIEE - Introduction & building reports
OBIEE - Introduction & building reportsDeepika Raipuria
 
Raspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRaspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRobomart
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Seminar Presentation on raspberry pi
Seminar Presentation on raspberry piSeminar Presentation on raspberry pi
Seminar Presentation on raspberry piGeorgekutty Francis
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pipraveen_23
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introductionLTG Oxford
 
Oracle business intelligence overview
Oracle business intelligence overviewOracle business intelligence overview
Oracle business intelligence overviewnvvrajesh
 

En vedette (18)

Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
Intelligent Traffic light detection for individuals with CVD
Intelligent Traffic light detection for individuals with CVDIntelligent Traffic light detection for individuals with CVD
Intelligent Traffic light detection for individuals with CVD
 
REST in Practice
REST in PracticeREST in Practice
REST in Practice
 
Ionic by Example
Ionic by ExampleIonic by Example
Ionic by Example
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
OBIEE - Introduction & building reports
OBIEE - Introduction & building reportsOBIEE - Introduction & building reports
OBIEE - Introduction & building reports
 
Introduction to OBIEE 11g
Introduction to OBIEE 11gIntroduction to OBIEE 11g
Introduction to OBIEE 11g
 
Building Oracle BIEE (OBIEE) Reports, Dashboards
Building Oracle BIEE (OBIEE) Reports, DashboardsBuilding Oracle BIEE (OBIEE) Reports, Dashboards
Building Oracle BIEE (OBIEE) Reports, Dashboards
 
Raspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRaspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - Robomart
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Seminar Presentation on raspberry pi
Seminar Presentation on raspberry piSeminar Presentation on raspberry pi
Seminar Presentation on raspberry pi
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introduction
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Oracle business intelligence overview
Oracle business intelligence overviewOracle business intelligence overview
Oracle business intelligence overview
 

Similaire à Build Mobile Apps with PhoneGap

PhoneGap - Now and the Future
PhoneGap - Now and the FuturePhoneGap - Now and the Future
PhoneGap - Now and the FutureTim Kim
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGapMihai Corlan
 
Phonegap
PhonegapPhonegap
PhonegapTim Kim
 
Cross Platform Mobile App Development
Cross Platform Mobile App Development Cross Platform Mobile App Development
Cross Platform Mobile App Development Jakir Hossain
 
Mobile Development with PhoneGap
Mobile Development with PhoneGapMobile Development with PhoneGap
Mobile Development with PhoneGapDaniel Ramos
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampMihai Corlan
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildTerry Ryan
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGapChristian Rokitta
 
Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkAayush Shrestha
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application developmentEngin Hatay
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Ryan Cuprak
 

Similaire à Build Mobile Apps with PhoneGap (20)

PhoneGap - Now and the Future
PhoneGap - Now and the FuturePhoneGap - Now and the Future
PhoneGap - Now and the Future
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
PhoneGap/Cordova
PhoneGap/CordovaPhoneGap/Cordova
PhoneGap/Cordova
 
Webapi
WebapiWebapi
Webapi
 
Phonegap
PhonegapPhonegap
Phonegap
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Cross Platform Mobile App Development
Cross Platform Mobile App Development Cross Platform Mobile App Development
Cross Platform Mobile App Development
 
Mobile Development with PhoneGap
Mobile Development with PhoneGapMobile Development with PhoneGap
Mobile Development with PhoneGap
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap Build
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap
 
Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic Framework
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Apache Cordova
Apache CordovaApache Cordova
Apache Cordova
 

Plus de Ramesh Nair

solUI Introduction (2019)
solUI Introduction (2019)solUI Introduction (2019)
solUI Introduction (2019)Ramesh Nair
 
Kickback - incentivizing event attendance through crypto economics
Kickback - incentivizing event attendance through crypto economicsKickback - incentivizing event attendance through crypto economics
Kickback - incentivizing event attendance through crypto economicsRamesh Nair
 
Introduction to Blockchains
Introduction to BlockchainsIntroduction to Blockchains
Introduction to BlockchainsRamesh Nair
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generatorsRamesh Nair
 
Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to DartRamesh Nair
 
ES6 - Next Generation Javascript
ES6 - Next Generation JavascriptES6 - Next Generation Javascript
ES6 - Next Generation JavascriptRamesh Nair
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013Ramesh Nair
 

Plus de Ramesh Nair (7)

solUI Introduction (2019)
solUI Introduction (2019)solUI Introduction (2019)
solUI Introduction (2019)
 
Kickback - incentivizing event attendance through crypto economics
Kickback - incentivizing event attendance through crypto economicsKickback - incentivizing event attendance through crypto economics
Kickback - incentivizing event attendance through crypto economics
 
Introduction to Blockchains
Introduction to BlockchainsIntroduction to Blockchains
Introduction to Blockchains
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generators
 
Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to Dart
 
ES6 - Next Generation Javascript
ES6 - Next Generation JavascriptES6 - Next Generation Javascript
ES6 - Next Generation Javascript
 
Javascript Update May 2013
Javascript Update May 2013Javascript Update May 2013
Javascript Update May 2013
 

Dernier

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 

Dernier (20)

Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 

Build Mobile Apps with PhoneGap

  • 1. Intro to PhoneGap Ramesh Nair / hiddentao Oct 2014 @ Taipei Javascript Enthusiasts
  • 2. What is PhoneGap? • Build mobile apps using HTML5, Javascript and CSS • Created by Nitobi in 2008 • Acquired by Adobe in 2011 • Code also given to Apache to create “Cordova” • Today 2 projects: Phonegap and Cordova • If Cordova = Blink/Webkit then Phonegap = Chrome • PhoneGap adds extra features to Cordova (e.g. cloud build) • http://cordova.apache.org/ • http://phonegap.com/
  • 3. Single codebase Multiple platforms img: http://adrocknaphobia.github.io/preso-future-of-mobile/
  • 5. How does it work? HTML, Javascript, CSS PhoneGap Javascript API Web browser / UIWebView PhoneGap Native Library Native Platform Mobile app
  • 6. Getting started Java-like package name $ npm install -g cordova $ cordova create ./mydemo com.mydemo MyDemo $ cd mydemo $ cordova platform add android $ cordova run android Assume iOS/Android SDK is setup Pre-requisites: Android SDK, ANDROID_HOME, ant
  • 7. Folder layout config.xml - used to generate iOS/Android config hooks/ - actions to run at various points during the build platforms/ - apps for each platform, same as normal apps plugins/ - cordova/phonegap plugins which add functionality www/ - where your HTML, JS and CSS live -> platforms/android/assets/www -> platforms/ios/www -> …
  • 8. Live-reload = rapid feedback • “The PhoneGap Developer App” • http://app.phonegap.com/ • Available from iOS and Android app stores • phonegap serve • npm install -g phonegap • Watches www/ folder for changes, tells page to reload itself • You can test this in a normal browser too • There is also cordova serve but not sure what it’s supposed to do
  • 9. Plugins • Allow you to interact with the rest of your device (beyond the web browser) through Javascript • Plugins usually have 2 components: 1. Platform-specific native layer (Android, iOS, etc) 2. Javascript API (used by your app) • All standard device features (e.g. contacts, compass, etc) accessed through plugins • Can also interact with other apps (e.g. Facebook app, Google Maps) • Plugin registry: http://plugins.cordova.io/
  • 10. Adding a plugin • Geolocation plugin (lat/long) • http://plugins.cordova.io/#/package/ org.apache.cordova.geolocation • We use navigator.geolocation.watchPosition to get the latitude/longitude co-ordinates. $ cordova plugin add org.apache.cordova.geolocation $ cordova run android …OR… phonegap serve
  • 11. Live-reload issues • PhoneGap Developer App comes with basic plugins - geolocation, camera, etc. • But what if we want to use a plugin it doesn’t have, e.g. Google Maps or our own custom plugin? • We can’t use live-reload with phonegap serve… • …so we will build the live reload mechanism ourselves!
  • 12. Live-reload issues • PhoneGap Developer App comes with basic plugins - geolocation, camera, etc. • But what if we want to use a plugin it doesn’t have, e.g. Google Maps or our own custom plugin? • We can’t use live-reload with phonegap serve… • …so we will build the live reload mechanism ourselves!
  • 13. Use gulp for live-reload • gulp-server-livereload - watch for changes and send reload signal • gulp-replace-task - auto-insert live reload host:port into HTML page • Demo app • https://github.com/hiddentao/phonegap-demo-app
  • 14. Useful links • Ionic framework - http://ionicframework.com • Like Twitter Bootstrap but for hybrid apps. • Built on Angular.JS • Meteor - http://meteor.com/ • Isomorphic Javascript framework (built on node.js) • Lets you push code update to clients on-the-fly • PhoneGap build - https://build.phonegap.com/ • Build and packaging done on a cloud server, saves you time and effort • Trigger.io - https://trigger.io/ • Like PhoneGap but is proprietary and costs money • Easier to use than PhoneGap, better plugin integration, etc.
  • 15. Any Questions? “PhoneGap is making the world a better place through constructing elegant hierarchies for maximum code reuse and extensibility”