SlideShare a Scribd company logo
Developing with
  Phonegap
Building mobile applications with HTML/JS
Ryan Stewart
         Web Developer Advocate, Adobe

                ryan@adobe.com

                blog.digitalbackcountry.com
                @ryanstewart

                github.com/ryanstewart



Based in Seattle
Things I Like:
 Beer
 Mountaineering/Hiking/Backpacking
 Geolocation/Mapping stuff
Why PhoneGap?
The moral reason:
The web is awesome
The realistic reason:
     Cross platform
applications with HTML/
CSS/JS will be faster and
          easier
What is PhoneGap?
Intro to PhoneGap
Your Code
Your Code
Native Web View
Your Code
Native Web View
  Native APIs
Your Code
     Native Web View
       Native APIs
Native App - .apk, .ipa, etc
PhoneGap uses the native browser
on the device to render the HTML/
              CSS/JS

 Keep in mind that can affect the
experience. It also keeps apps nice
             and small
PhoneGap uses the
native project
format for each
platform.
Open, emulate,
and test from
within the native
development
environment!
Because it’s using
the native projects
it’s fully
extendable.
PhoneGap provides
a JavaScript Library
that reaches out
into the native
APIs.
That means
anything the
device supports is
doable.
PhoneGap is
completely open
source and is part
of the Apache
foundation.
The entire project
is available on
Github
https://
github.com/
cordova
Getting Started
bin/create /Developer/Sites/demoapp
  com.digitalbackcountry DemoApp
Demo:
Hello World
Quick segue: mobile
 web apps versus
mobile applications
Very important to
keep in mind that
we’re building a
mobile app, not a
mobile web app.

Let’s look at
jQuery Mobile
You can use ANY
framework you
want, but try to
design for an app.
Diving into the
PhoneGap APIs
-   Accelerometer
                    -   Camera
                    -   Capture
Out of the box,     -   Compass
                    -   Connection
PhoneGap            -   Contacts
                    -   Device
provides support    -   Events
for a number of     -
                    -
                        File
                        Geolocation
basic device APIs   -
                    -
                        Media
                        Network
                    -   Notification
                    -   Storage
capturePhotoEdit: function() {
               navigator.camera.getPicture(onPhotoDataSuccess, onFail, {
                        quality: 20, allowEdit: true });
             },

Camera API   onPhotoDataSucess: function(imageData) {
               var smallImage = document.getElementById('smallImage');


example
               smallImage.style.display = 'block';
               smallImage.src = "data:image/jpeg;base64," + imageData;
             },
             onFail: function(message) {
                alert('Failed because: ' + message);
             }
Demo:
PhoneGap API Explorer
Debugging
It’s all just HTML/
JS, so you can use
your browser!
Take advantage of
Chrome Developer
tools/Firebug to
test your app’s UI.
But what about Device APIs?
Because we’re in the web view, there is no
   way to do line-by-line debugging.
Luckily we have
Weinre, which lets
us debug and
manipulate the
DOM from our PCs.
Weinre is built with
node.JS and acts as
a server and uses
the developer tools
from Chrome to
provide hooks into
the mobile app.
Drop in a <script>
tag on a remote
server and Weinre
will let you use the
Developer Tools on
your apps.
Requires internet
access, so keep
that in mind.
But, a much easier way:
http://debug.phonegap.com/
Demo:
debug.phonegap
Extending Phonegap
For added
functionality
PhoneGap provides
a plug-in
mechanism.
Includes OS-
specific code/
libraries and the JS
to use it in
PhoneGap
Some of the
helpful ones:
PayPal, Facebook,
Push Notification
Plug-is are one of
the areas that
show off the power
of a hybrid web/
native approach.
There are a ton of
native-centric
SDKs (like
Facebook) that
provide a great
native experience.
We can use those!
Available at
https://github.com/phonegap/phonegap-plugins
Final
Considerations
Remember that we’re on different
          platforms
Versus




  http://developer.apple.com/library/IOs/#documentation/
UserExperience/Conceptual/MobileHIG/UIElementGuidelines/     http://developer.android.com/design/index.html
                 UIElementGuidelines.html
Demo:
PhoneGap in Action
Deploying
PhoneGap Apps
build.phonegap.com
The Problem:

You’re building a cross-platform app, but
   dealing with a lot of native projects
The Solution:
   PhoneGap Build - create distribution
binaries for multiple platforms in one place
Intro to PhoneGap
Build includes git
support so you can
use git and host
projects on
PhoneGap or build
a project from
Github.
Build lets you
define individuals
as tester/developer
which changes
permissions on the
project
accordingly.
You can use Build as your testing
distribution as well by making the
      download pages public.
Will (soon) support
popular plugins so
that you can build
plugins right into
the build process.
Supports multiple
PhoneGap versions
so you can target a
wide range of
devices.
Demo:
PhoneGap Build
Q&A



 Ryan Stewart
 Web Developer Advocate, Adobe

        ryan@adobe.com

        blog.digitalbackcountry.com
        @ryanstewart

        github.com/ryanstewart

More Related Content

KEY
From mobile browser to mobile app
PDF
Developing with Phonegap - Adobe Refresh 2012
PDF
Debugging and deploying with phone gap
PPTX
All About Phonegap
KEY
Mapping and Geolocation on the Flash Platform
PPTX
Phone gap
PPT
Building Hybrid Applications using PhoneGap
PDF
Introduction to PhoneGap
From mobile browser to mobile app
Developing with Phonegap - Adobe Refresh 2012
Debugging and deploying with phone gap
All About Phonegap
Mapping and Geolocation on the Flash Platform
Phone gap
Building Hybrid Applications using PhoneGap
Introduction to PhoneGap

What's hot (19)

PDF
PhoneGap: Building Mobile Applications with HTML/JS
PDF
Building Native Mobile Applications with PhoneGap
PPTX
PhoneGap: a brief history and apologia
PDF
PhoneGap Day US 2013 - Chrome Packaged Apps
PPT
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
PPTX
Building mobile apps using Phonegap
PPTX
Phone gap
ODP
Introduction to PhoneGap
PDF
Introduction to PhoneGap
PDF
PhoneGap Talk @ Sencha Con 2010
PDF
Mobile Development with PhoneGap
PPTX
Phonegap - An Overview
PPTX
Rapid Prototyping with Cordova aka Phonegap
PDF
Cordova and PhoneGap Insights
PPTX
Flutter vs React Native Development in 2020
PPTX
BlackBerry WebWorks
PDF
React native vs. ionic – which one is better and why
PDF
Introduction to flutter
PDF
Flutter Tutorial For Beginners | Edureka
PhoneGap: Building Mobile Applications with HTML/JS
Building Native Mobile Applications with PhoneGap
PhoneGap: a brief history and apologia
PhoneGap Day US 2013 - Chrome Packaged Apps
DroidCon 2011: Developing HTML5 and hybrid Android apps using Phonegap
Building mobile apps using Phonegap
Phone gap
Introduction to PhoneGap
Introduction to PhoneGap
PhoneGap Talk @ Sencha Con 2010
Mobile Development with PhoneGap
Phonegap - An Overview
Rapid Prototyping with Cordova aka Phonegap
Cordova and PhoneGap Insights
Flutter vs React Native Development in 2020
BlackBerry WebWorks
React native vs. ionic – which one is better and why
Introduction to flutter
Flutter Tutorial For Beginners | Edureka
Ad

Similar to Intro to PhoneGap (20)

PPT
Build Cross-Platform Mobile Application with PhoneGap
PDF
Building Cross-Platform Mobile Apps
PPTX
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PPT
Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...
PPTX
Phone gap development, testing, and debugging
PPT
PhoneGap
PPT
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
PPTX
Appium solution
PDF
Dreamweaver CS6, jQuery, PhoneGap, mobile design
DOCX
Phone gap in android technology
PPT
Phonegap android
PDF
Webapi
PPTX
[Devoxx Morocco 2015] Apache Cordova In Action
PPTX
phonegap_101
PPTX
Building Cross-Platform JavaScript Apps using Cordova
PPTX
PhoneGap - Now and the Future
PPTX
Mobile application development platform
PDF
Getting started with PhoneGap
PDF
Fixing the mobile web - Internet World Romania
PDF
PhoneGap JavaScript API vs Native Components
Build Cross-Platform Mobile Application with PhoneGap
Building Cross-Platform Mobile Apps
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...
Phone gap development, testing, and debugging
PhoneGap
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
Appium solution
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Phone gap in android technology
Phonegap android
Webapi
[Devoxx Morocco 2015] Apache Cordova In Action
phonegap_101
Building Cross-Platform JavaScript Apps using Cordova
PhoneGap - Now and the Future
Mobile application development platform
Getting started with PhoneGap
Fixing the mobile web - Internet World Romania
PhoneGap JavaScript API vs Native Components
Ad

More from Ryan Stewart (7)

PDF
HTML5 and jQuery for Flex Developers
PPT
Getting Started with Flex and PHP
KEY
Flash Builder and Flex Future - Multiscreen Development
KEY
Introduction to Flex Hero for Mobile Devices
KEY
Getting Started with Flex and PHP
PDF
Mapping and Geolocation with the Flash Platform
KEY
DelveNYC: Flash Catalyst
HTML5 and jQuery for Flex Developers
Getting Started with Flex and PHP
Flash Builder and Flex Future - Multiscreen Development
Introduction to Flex Hero for Mobile Devices
Getting Started with Flex and PHP
Mapping and Geolocation with the Flash Platform
DelveNYC: Flash Catalyst

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Understanding_Digital_Forensics_Presentation.pptx
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Advanced methodologies resolving dimensionality complications for autism neur...

Intro to PhoneGap

Editor's Notes