SlideShare a Scribd company logo
PhoneGap

Facebook Hack
Steve Gill
    PhoneGap Champ
Facebook.com/stevengill97
       @SteveSGill
   steveng@adobe.com
What is PhoneGap?
Lay of the Land
iOS .............................. Objective C
Android ...................... Java ‘Harmony’ / C++
BlackBerry ................. Java J2ME / C++ (maybe?)
webOS ........................ HTML, CSS and JS
Windows Phone 7 ... .NET
Bada ............................. C++
PhoneGap Pattern


1. Embed a chromeless browser in a native app
2. Create a “bridge” between the browser and the
   native code
3. Write a web app
4. Package the web app with the native code and deploy
   to devices!
Supported Platforms
•   iOS (iPad, iPod Touch, iPhone)
•   Android (Everything)
•   BlackBerry (Smartphones, PlayBook)
•   WebOS
•   Windows Phone
•   Symbian
•   Bada
Write once debug everywhere
PhoneGap talk from Singapore
W3C Device APIs and
Policies Working Group
         (DAP)
PhoneGap
      &
Apache Cordova
How do you write
 PhoneGap apps?
Basics: HTML


<button>I’m native codes!</button>
Setup the Viewport


<meta name="viewport" content="width=dev
ice-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no;" />
Basics: CSS3

• Media queries come in handy for tablets
• Many folk using precompilers these days
• Opacity, rounded corners, gradients and
  fucking drop shadows fuck ya!
CSS3 Animations


-webkit-transform:
  translate3d(x,y,z) scale3D(1,1,1.0)
Media Query
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:landscape)" href="ipad-
landscape.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:landscape)" href="ipad-
landscape.css">
Basics: JavaScript


• Language of the web.
• Some quirks: http://wtfjs.com
Startup

document.addEventListener(
  ‘deviceready’,
  function() {
     alert(‘WINNING!’);
  },
  false);
PhoneGap talk from Singapore
Clear as Mud
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
• NO FAIRY DUST / SPARKLES
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
• NO FAIRY DUST / SPARKLES
• NO UNICORNS GET HURT
Partners / Contributors
•   Adobe
•   IBM
•   Sony Ericsson
•   Symbian
•   HP/Palm
•   RIM
•   Microsoft
Power Users

• Alcatel Lucent
• Sabre
• Deutsche Telecom
• Ars Technica
• WikiMedia
PhoneGap APIs

• Sensors
• Data
• Events

        http://docs.phonegap.com
Sensors

• GPS
• Accelerometer
• Compass
• Network
• Camera
Data

• Contacts
• Media
• File system
• Notifications
Events

• onload (duh)
• ondeviceready (this is special)
• onnativeready
• onresume
• onpause
Tooling
• Use any IDE
• Use the platform emulators (at your peril)
• Use Ripple emulator
• Use Web Inspector Remote (Weinre)
• Srsly use Weinre
• Console.log and alert =(
Libraries

• DOM
• Testing
• Style / GUI
• Persistence
Plugins
Facebook PhoneGap
          Plugin
Take your mobile Facebook app and make it native
        Take advantage of PhoneGap APIs
       Distribute in app stores & go offline
How the Fb Plugin
           Works
Adds hooks into Facebook JS SDK to call the plugin
   Maps some FB JS calls to native FB iOS SDK
Demo
More Fb Plugin Info
                      Source Code:
github.com/davejohnson/phonegap-plugin-facebook-connect
                    iOS Install video:
                 youtube.com/phonegap
              Android Video Coming Soon!
project resources
                    phonegap.com
                    docs.phonegap.com
                    wiki.phonegap.com
                    git.apache.org
                    issues.apache.org/jira/browse/CB
                    groups.google.com/group/phonegap
                    twitter.com/phonegap
                    facebook.com/phonegap
                    #phonegap on freenode
                    youtube.com/phonegap
    thank you       github.com/davejohnson/phonegap-
                    plugin-facebook-connect

More Related Content

KEY
Phonegap facebook- plugin
Steve Gill
 
KEY
Phonegap facebook plugin - Seoul & Tokyo
Steve Gill
 
PDF
PGDAY EU 2016 workshop - privacy and security
Steve Gill
 
KEY
PhoneGap Slides from HTML5 Next and Now
Steve Gill
 
PDF
Firefox mobile Get, Set .... Test
playingwithsid
 
PDF
The Progressive Web and its New Challenges - Confoo Montréal 2017
Christian Heilmann
 
PDF
Web Based Mobile Linux World
Oytun Eren Sengul
 
PDF
Mobile Web High Performance
Maximiliano Firtman
 
Phonegap facebook- plugin
Steve Gill
 
Phonegap facebook plugin - Seoul & Tokyo
Steve Gill
 
PGDAY EU 2016 workshop - privacy and security
Steve Gill
 
PhoneGap Slides from HTML5 Next and Now
Steve Gill
 
Firefox mobile Get, Set .... Test
playingwithsid
 
The Progressive Web and its New Challenges - Confoo Montréal 2017
Christian Heilmann
 
Web Based Mobile Linux World
Oytun Eren Sengul
 
Mobile Web High Performance
Maximiliano Firtman
 

What's hot (20)

KEY
Philly ete-2011
davyjones
 
PDF
I Phone Developer Introduction By Eschipul
Ed Schipul
 
PDF
Getting Your Hooks into Cordova
ColdFusionConference
 
PPT
Augmented Reality (AR) - The Future of Mobile Applications?
Carin Campanario
 
PDF
Why HTML5 is getting on my nerves…
Avenga Germany GmbH
 
PDF
Mobile Web & HTML5 Performance Optimization
Maximiliano Firtman
 
PDF
Android Wear Applications in C# with Xamarin
James Montemagno
 
PDF
A New Hope – the web strikes back
Christian Heilmann
 
PDF
How you can become an Accessibility Superhero
robzonenet
 
PDF
The Mobile Web - Fronteers 2009
Peter-Paul Koch
 
PPTX
Bug Bounty #Defconlucknow2016
Shubham Gupta
 
PPTX
Digpen 7: Building mobile apps with PhoneGap
Christian Cook
 
PDF
PhoneGap mobile development
Maximiliano Firtman
 
PDF
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Demian Borba
 
PDF
Progressive Web Apps – the return of the web?
Christian Heilmann
 
PDF
Prebrowsing - Velocity NY 2013
Steve Souders
 
PDF
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Frans Rosén
 
PDF
The Soul in The Machine - Developing for Humans
Christian Heilmann
 
PDF
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Max Katz
 
PDF
Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...
Compuware APM
 
Philly ete-2011
davyjones
 
I Phone Developer Introduction By Eschipul
Ed Schipul
 
Getting Your Hooks into Cordova
ColdFusionConference
 
Augmented Reality (AR) - The Future of Mobile Applications?
Carin Campanario
 
Why HTML5 is getting on my nerves…
Avenga Germany GmbH
 
Mobile Web & HTML5 Performance Optimization
Maximiliano Firtman
 
Android Wear Applications in C# with Xamarin
James Montemagno
 
A New Hope – the web strikes back
Christian Heilmann
 
How you can become an Accessibility Superhero
robzonenet
 
The Mobile Web - Fronteers 2009
Peter-Paul Koch
 
Bug Bounty #Defconlucknow2016
Shubham Gupta
 
Digpen 7: Building mobile apps with PhoneGap
Christian Cook
 
PhoneGap mobile development
Maximiliano Firtman
 
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Demian Borba
 
Progressive Web Apps – the return of the web?
Christian Heilmann
 
Prebrowsing - Velocity NY 2013
Steve Souders
 
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Frans Rosén
 
The Soul in The Machine - Developing for Humans
Christian Heilmann
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Max Katz
 
Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...
Compuware APM
 
Ad

Similar to PhoneGap talk from Singapore (20)

KEY
PhoneGap at Facebook Mobile Hack
PhoneGap
 
KEY
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
PDF
Getting started with PhoneGap
Mihai Corlan
 
PDF
PhoneGap/Cordova
Mihai Corlan
 
PDF
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
glen_a_smith
 
PDF
PhoneGap Talk @ Sencha Con 2010
alunny
 
PPTX
Phone gap development, testing, and debugging
Kongu Engineering College, Perundurai, Erode
 
PPTX
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
Mihai Corlan
 
PPTX
All About Phonegap
Sushan Sharma
 
PPTX
phonegap_101
Asanka Indrajith
 
PPTX
Phonegap
Tim Kim
 
PDF
Building cross platform mobile web apps
James Pearce
 
KEY
Android development workshop
Jeff Sonstein
 
PPTX
Intro to PhoneGap
Chris Griffith
 
PDF
Maximiliano Firtman - Разработка приложений с помощью PhoneGap
.toster
 
PDF
Intro to PhoneGap
Jussi Pohjolainen
 
PDF
Building Cloud-Based Cross-Platform Mobile Web Apps
James Pearce
 
PDF
PhoneGap in 60 Minutes or Less
Troy Miles
 
PPTX
Intro to PhoneGap and PhoneGap Build
Chris Griffith
 
PPTX
Phonegap
Marissa Parmele
 
PhoneGap at Facebook Mobile Hack
PhoneGap
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Getting started with PhoneGap
Mihai Corlan
 
PhoneGap/Cordova
Mihai Corlan
 
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
glen_a_smith
 
PhoneGap Talk @ Sencha Con 2010
alunny
 
Phone gap development, testing, and debugging
Kongu Engineering College, Perundurai, Erode
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
Mihai Corlan
 
All About Phonegap
Sushan Sharma
 
phonegap_101
Asanka Indrajith
 
Phonegap
Tim Kim
 
Building cross platform mobile web apps
James Pearce
 
Android development workshop
Jeff Sonstein
 
Intro to PhoneGap
Chris Griffith
 
Maximiliano Firtman - Разработка приложений с помощью PhoneGap
.toster
 
Intro to PhoneGap
Jussi Pohjolainen
 
Building Cloud-Based Cross-Platform Mobile Web Apps
James Pearce
 
PhoneGap in 60 Minutes or Less
Troy Miles
 
Intro to PhoneGap and PhoneGap Build
Chris Griffith
 
Phonegap
Marissa Parmele
 
Ad

Recently uploaded (20)

PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Software Development Methodologies in 2025
KodekX
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
The Future of Artificial Intelligence (AI)
Mukul
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 

PhoneGap talk from Singapore

Editor's Notes

  • #2: \n
  • #3: Always wanted to see how this picture looked on the big screen\n
  • #4: Who has heard of PhoneGap before? PhoneGap is a free and open source framework that enables developers to write cross platform mobile applications using html5, css3 and javascript.\n
  • #5: \n
  • #6: \n
  • #7: \n
  • #8: \n
  • #9: This approach lets you write once run anywhere\n
  • #10: HTML 5 is huge. All you hear now a days is html5 this and html 5 that. With PhoneGap you get to use HTML5, CSS3 and Javascript. The PhoneGap team is \n
  • #11: \n
  • #12: We achieve cross platform development through neither magic nor the force, but through HTML, JavaScript and CSS.\n
  • #13: \n
  • #14: \n
  • #15: \n
  • #16: \n
  • #17: \n
  • #18: \n
  • #19: \n
  • #20: \n
  • #21: \n
  • #22: \n
  • #23: Bring it all together\n
  • #24: \n
  • #25: \n
  • #26: \n
  • #27: \n
  • #28: \n
  • #29: \n
  • #30: \n
  • #31: \n
  • #32: \n
  • #33: \n
  • #34: \n
  • #35: \n
  • #36: \n
  • #37: \n
  • #38: \n
  • #39: SSO, Dialogs, etc\n
  • #40: \n
  • #41: \n
  • #42: \n