Getting Started with PhoneGap

3,952 views

Published on

Ever wanted to build mobile applications for iOS, but just couldn't get your head around Objective C? Perhaps you prefer Android, but Java just didn't seem like the right fit for you? Allowing you to leverage your web development skills, to build and deploy mobile applications is what PhoneGap is all about. In this presentation you'll learn how to get started with PhoneGap for iOS and Android, how to leverage native device features, and get a better understanding of how device UX mechanics will impact your development workflow.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,952
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
155
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Getting Started with PhoneGap

    1. 1. Getting Started with PhoneGap Kevin Hoyt Manager, Developer Evangelism Adobe Systems, Inc.
    2. 2. What Gap?
    3. 3. What Gap?Objective C Java Java
    4. 4. What Gap?Objective C Java Java WebKit WebKit WebKit
    5. 5. iPhoneDevCamp 2008
    6. 6. PhoneGap 0.9.3 iPhone Android BlackBerry Symbian PalmGeo LocationVibrationAccelerometer OS 4.7SoundContact Support N/A
    7. 7. Checkpoint #1 Native Application Browser ApplicationWho, what, when, where and why will help solve how.
    8. 8. iPhone • Intel-based Mac OS X (10.6) • XCode and iPhone SDK • Apple iOS device (for testing) • iOS developer certificate • Latest version of PhoneGap
    9. 9. Android • Eclipse Ganymede (3.4) • Android SDK (r08) • Android Virtual Device (AVD) • Latest version of PhoneGap • Android device (for testing)
    10. 10. Dreamweaver CS5 • Code Intelligence • Split View • Live View • Live Code • Media Queries
    11. 11. “You with me? So let’s do this thing!” - Linguine
    12. 12. Checkpoint #2Display resolution and pixel density both matter.
    13. 13. Closing the Gap<html><head><script src=”phonegap.js”></script><script>function doLoad() { document.addEventListener( ‘deviceready’, doDeviceReady, false );}</script></head><body onLoad=”doLoad();”><!-- Your content --></body></html>
    14. 14. Geo Locationvar watchID = 0;function doDeviceReady() { watchID = navigator.geolocation.watchPosition( doLocation, onFailure, { frequency: 3000 } );}function doLocation( position ) { alert( Latitude: + position.coords.latitude + n + Longitude: + position.coords.longitude );}
    15. 15. Vibrationfunction doDeviceReady() { // Empty}function doVibrate() { navigator.notification.vibrate( 2000 );}...<a href="#" onClick="doVibrate(); return false;"> Vibrate</a>
    16. 16. Accelerometerfunction doDeviceReady() { navigator.accelerometer.getCurrentAcceleration( doAcceleration, doFailure );}function doAcceleration( acceleration ) { alert( Acceleration X: + acceleration.x + n + Acceleration Y: + acceleration.y + n + Acceleration Z: + acceleration.z + n + Timestamp: + acceleration.timestamp );}
    17. 17. Soundvar media = null;function doDeviceReady() { var media = new Media( rock-guitar.mp3, doComplete, doFailure );}function doMedia() { media.play( 2000 );}...<a href="#" onClick="doMedia(); return false;">Play Sound</a>
    18. 18. Contact Supportfunction doDeviceReady() { var fields = [displayName, names]; var options = new ContactFindOptions( { filter: Bob } ); navigator.service.contacts.find( fields, doResults, onFailure, options );}function doResults( contacts ) { for( var c = 0; c < contacts.length; c++ ) { console.log( Display Name = + contacts[c].displayName ); }}
    19. 19. Checkpoint #3Different devices yield different user expectations.
    20. 20. Checkpoint #3Different devices yield different user expectations.
    21. 21. ResourcesGetting Started PhoneGap Tutorials Documentation ?Eclipse Project My Blog Plugin
    22. 22. Getting Started with PhoneGap Kevin Hoyt Manager, Developer Evangelism Adobe Systems, Inc.

    ×