Your SlideShare is downloading. ×
0
MOBILE JAVA              (GWT, MGWT, PHONEGAP)                        Still “Write Once Run Everywhere”                   ...
MOBILE JAVA              (GWT, MGWT, PHONEGAP)                        Still “Write Once Run Everywhere”                   ...
MURAT YENER                Java/JavaEE, GWT, Flex,                Android, iOS, Node.js...                       Developer...
This talk is highly inspired by Matt Raible’s talk at Devoxx                   http://www.parleys.com/#st=5&id=2925&sl=0Fr...
MOBIL APPSFriday, May 25, 12
MOBIL APPS             •   AndroidFriday, May 25, 12
MOBIL APPS             •   Android             •   iPhoneFriday, May 25, 12
MOBIL APPS             •   Android             •   iPhone             •   BlackberryFriday, May 25, 12
MOBIL APPS             •   Android             •   iPhone             •   Blackberry             •   Windows PhoneFriday, ...
MOBIL APPS             •   Android             •   iPhone             •   Blackberry             •   Windows Phone        ...
MOBIL APPS             •   Android             •   iPhone             •   Blackberry             •   Windows Phone        ...
HTML                        HTML2                            CSS+JS                                                       ...
+ Blackberry                                                                                                              ...
Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
HTML MOBILE FRAMEWORKS                • Sencha                • Titanium                • ...Friday, May 25, 12
HTML5               • Storage, WebSQL, Application       Cache, Web Workers,                     WebSocket, Notifications, ...
CSS3        • Animated Transitions        • Rounded         Corners        • Drop        Shadows        • Gradient       C...
JAVASCRIPT         • IDE?         • Debugging?Friday, May 25, 12
JAVASCRIPT         • IDE?         • Debugging?Friday, May 25, 12
Friday, May 25, 12
Friday, May 25, 12
GOOGLE WEB TOOLKIT          • Write     Java, compile Javascript          • Eclipse   integration          • Debug     Jav...
GOOGLE WEB TOOLKIT          • Write     Java, compile Javascript          • Eclipse   integration          • Debug     Jav...
GOOGLE WEB TOOLKIT          • Write     Java, compile Javascript          • Eclipse   integration          • Debug     Jav...
GOOGLE WEB TOOLKIT          • Write     Java, compile Javascript          • Eclipse   integration          • Debug     Jav...
GWT, MOBILE?     • Style?        (CSS?)     • Native Widgetlar (Button,          Combo, Checkbox...)     • Online/Offline  ...
GWT, MOBILE?     • Style?        (CSS?)     • Native Widgetlar (Button,          Combo, Checkbox...)     • Online/Offline  ...
UIFriday, May 25, 12
UIFriday, May 25, 12
UIFriday, May 25, 12
UIFriday, May 25, 12
LOOKING NATIVE           • gwt-mobile-webkit: database, storage,                geolocation, widgets(?) http://code.google...
LOOKING NATIVE           • gwt-mobile-webkit: database, storage,                geolocation, widgets(?) http://code.google...
LOOKING NATIVE           • gwt-mobile-webkit: database, storage,                geolocation, widgets(?) http://code.google...
LOOKING NATIVE           • gwt-mobile-webkit: database, storage,                geolocation, widgets(?) http://code.google...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
MGWT      • Standard       GWT (Java)      • JavaScript     via JSNI      • Native       looking widgets      • iOS, Andro...
Friday, May 25, 12
Friday, May 25, 12
PROJECT :)          • Chronometer      + map              (location, maps)          • MP3      player (audio)          • F...
PROJECT :)          • Chronometer      + map              (location, maps)          • MP3      player (audio)          • F...
PROJECT :)          • Chronometer      + map              (location, maps)          • MP3      player (audio)          • F...
PROJECT :)          • Chronometer      + map              (location, maps)          • MP3      player (audio)          • F...
STARTING MGWT          • Eclipse   GWT plugin          • MGWT          • Model-View-Presenter          • Maven ArchetypeFr...
STARTING MGWT          • Eclipse   GWT plugin          • MGWT          • Model-View-Presenter          • Maven ArchetypeFr...
STARTING MGWT          • Eclipse   GWT plugin          • MGWT          • Model-View-Presenter          • Maven ArchetypeFr...
STARTING MGWT          • Eclipse   GWT plugin          • MGWT          • Model-View-Presenter          • Maven ArchetypeFr...
MAPS    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/    • Google             Maps Ver 3.0:...
MAPS    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/    • Google             Maps Ver 3.0:...
MAPS    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/    • Google             Maps Ver 3.0:...
LOCATION               • HTML5       Geolocation               • Still   no Javascript!!Friday, May 25, 12
LOCATION               UserLocation.getLocation(new UserLocationCallback() {               	 @Override               	 pub...
LOCATION               UserLocation.getLocation(new UserLocationCallback() {               	 @Override               	 pub...
FIRST TRY     • HTML5             Geolocation not accurared     • Just          a straight line instead of a route     • T...
FIRST TRY     • HTML5             Geolocation not accurared     • Just          a straight line instead of a route     • T...
FIRST TRY     • HTML5             Geolocation not accurared     • Just          a straight line instead of a route     • T...
FIRST TRY     • HTML5             Geolocation not accurared                     enableHighAccuracy: True     • Just       ...
FIRST TRY     • HTML5             Geolocation not accurared                     enableHighAccuracy: True     • Just       ...
FIRST TRY     • HTML5             Geolocation not accurared                     enableHighAccuracy: True     • Just       ...
PHONEGAP    • or        the new Cordova    • iOS            Plugin (http://phonegap.com/start#ios-x4)    • Android        ...
PHONEGAP    • or        the new Cordova    • iOS            Plugin (http://phonegap.com/start#ios-x4)    • Android        ...
PHONEGAP    • or        the new Cordova    • iOS            Plugin (http://phonegap.com/start#ios-x4)    • Android        ...
BUT WHERE IS THE MAP?!?Friday, May 25, 12
URL PERMISSIONS               • maps.gstatic               • mt1.googleapis               • mt0.googleapis               •...
URL PERMISSIONS               • maps.gstatic               • mt1.googleapis               • mt0.googleapis               •...
URL PERMISSIONS               • maps.gstatic               • mt1.googleapis               • mt0.googleapis               •...
SECOND TRY     • Stillwhen the location updates stop         when the device is locked!Friday, May 25, 12
SECOND TRY     • Stillwhen the location updates stop         when the device is locked!Friday, May 25, 12
SECOND TRY                     Ph                        on                           e   Ga stop                         ...
PHONEGAP SETTINGSFriday, May 25, 12
MP3 PLAYER             • Local   vs Streaming             • HTML5     <Audio>             • com.phonegap.audiohandlerFrida...
MP3 PLAYER             • Local   vs Streaming             • HTML5     <Audio>             • com.phonegap.audiohandlerFrida...
HISTORY    • LocalStorage, Javascript   wrapper             public native static void setItem(String key, String value) /*...
MY FRIENDS      • Getting         contacts                     phoneGap.getContacts()      • Social         login         ...
MY FRIENDS                     PLUS.initialize(new SimpleEventBus(), new GoogleApiRequestTransport(APPLICATION_NAME, API_K...
MY FRIENDS      • Getting         contacts                     phoneGap.getContacts()      • Social         login         ...
MY FRIENDS      • Getting         contacts                     phoneGap.getContacts()      • Social         login         ...
PHONEGAP PLUGIN    • Android                 http://wiki.phonegap.com/w/page/43708611/How%20to%20Install%20a%20PhoneGap%20...
SWIPE PANEL    • Google+    • Built in widget in        Sencha and other        frameworks    • not            in mGWT!?! ...
SWIPE PANEL    • Google+    • Built in widget in        Sencha and other        frameworks    • not            in mGWT!?! ...
JSNIFriday, May 25, 12
JSNIFriday, May 25, 12
JSNIFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
MGWT GROUPS              https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
OK THEN...Friday, May 25, 12
OK THEN...Friday, May 25, 12
OK THEN...Friday, May 25, 12
LATEST NEWS!!!Friday, May 25, 12
LATEST NEWS!!!Friday, May 25, 12
LATEST NEWS!!!Friday, May 25, 12
PHONEGAP - CORDOVA    • Apache          Cordova Incubator    • 1.3<problem<1.7    • Cordova          1.7 - GwtPhonegap 1.7...
DEBUGGING    • Desktop: First                 Class Java Debugging    • Mobil: Gwt               Pretty Compile!          ...
LOCATION DEBUG    • Go             out!!!    • Also            only on iOS :(Friday, May 25, 12
CONCLUSION    • MGWT              + PhoneGap works! Not a silverbullet but sill great!    • Only           way to connect ...
Like the talk... A Hall14:30     and Matt Raible Devoxx 2011                     </PRESENTATION>                        mu...
Upcoming SlideShare
Loading in...5
×

Mobile Java with GWT, Still Write Once Run Everywhere (mGWT+Phonegap)

8,787

Published on

Mobile Native looking Cross Platform applications with Java using GWT+mGWT+phonegap.

Published in: Technology, News & Politics
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,787
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
140
Comments
0
Likes
6
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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript of "Mobile Java with GWT, Still Write Once Run Everywhere (mGWT+Phonegap)"

    1. 1. MOBILE JAVA (GWT, MGWT, PHONEGAP) Still “Write Once Run Everywhere” Murat YENERFriday, May 25, 12
    2. 2. MOBILE JAVA (GWT, MGWT, PHONEGAP) Still “Write Once Run Everywhere” Murat YENERFriday, May 25, 12
    3. 3. MURAT YENER Java/JavaEE, GWT, Flex, Android, iOS, Node.js... Developer Google Developer Group Istanbul Eclipsist 2008/2009, EclipseCon 2010, JavaOne 2011Friday, May 25, 12
    4. 4. This talk is highly inspired by Matt Raible’s talk at Devoxx http://www.parleys.com/#st=5&id=2925&sl=0Friday, May 25, 12
    5. 5. MOBIL APPSFriday, May 25, 12
    6. 6. MOBIL APPS • AndroidFriday, May 25, 12
    7. 7. MOBIL APPS • Android • iPhoneFriday, May 25, 12
    8. 8. MOBIL APPS • Android • iPhone • BlackberryFriday, May 25, 12
    9. 9. MOBIL APPS • Android • iPhone • Blackberry • Windows PhoneFriday, May 25, 12
    10. 10. MOBIL APPS • Android • iPhone • Blackberry • Windows Phone • Tablets?!?Friday, May 25, 12
    11. 11. MOBIL APPS • Android • iPhone • Blackberry • Windows Phone • Tablets?!?Friday, May 25, 12
    12. 12. HTML HTML2 CSS+JS Eclair 1991 HTML4 Donut Android Cupcake 1992 1993 CSS2 Honeycomb 1994 XHTML WM 2003 Beta Android 1.1 1995 Android 1.0 Gingerbread 1996 1997 Tableless WM 5 iPad Froyo ICS iPhone Web iPhone3GS iPad2 1998 1999 WM 6 2000 AJAX iPhone3G iPhone4S 2001 iPhone4 2002 2003 WinPhone7 2004 2005 HTML5 WEB & MOBILE 2006 2007 2008 2012 2009 2010 2011 2011 2012 2012Friday, May 25, 12
    13. 13. + Blackberry Symbian ... HTML HTML2 CSS+JS Eclair 1991 HTML4 Donut Android Cupcake 1992 1993 CSS2 Honeycomb 1994 XHTML WM 2003 Beta Android 1.1 1995 Android 1.0 Gingerbread 1996 1997 Tableless WM 5 iPad Froyo ICS iPhone Web iPhone3GS iPad2 1998 1999 WM 6 2000 AJAX iPhone3G iPhone4S 2001 iPhone4 2002 2003 WinPhone7 2004 2005 HTML5 WEB & MOBILE 2006 2007 2008 2012 2009 2010 2011 2011 2012 2012Friday, May 25, 12
    14. 14. Friday, May 25, 12
    15. 15. Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
    16. 16. Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
    17. 17. Web Apps: Teaching the old dog new tricks?Friday, May 25, 12
    18. 18. HTML MOBILE FRAMEWORKS • Sencha • Titanium • ...Friday, May 25, 12
    19. 19. HTML5 • Storage, WebSQL, Application Cache, Web Workers, WebSocket, Notifications, Drag&Drop, GeoLocation, Speech, Audio, Video, Canvas, SVG... • New tags!!! <article> <aside> <section> <header> <footer> <nav> <audio> <video> <datalist> <details>... • Gone!!! <applet> <center> <font> <frame> <frameset> • http://www.w3schools.com/html5/html5_reference.aspFriday, May 25, 12
    20. 20. CSS3 • Animated Transitions • Rounded Corners • Drop Shadows • Gradient Colors • Background Decoration • Text Effects • Web FontsFriday, May 25, 12
    21. 21. JAVASCRIPT • IDE? • Debugging?Friday, May 25, 12
    22. 22. JAVASCRIPT • IDE? • Debugging?Friday, May 25, 12
    23. 23. Friday, May 25, 12
    24. 24. Friday, May 25, 12
    25. 25. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!)Friday, May 25, 12
    26. 26. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!)Friday, May 25, 12
    27. 27. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!)Friday, May 25, 12
    28. 28. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!)Friday, May 25, 12
    29. 29. GWT, MOBILE? • Style? (CSS?) • Native Widgetlar (Button, Combo, Checkbox...) • Online/Offline • APIs (Camera, GPS, Contacts...)Friday, May 25, 12
    30. 30. GWT, MOBILE? • Style? (CSS?) • Native Widgetlar (Button, Combo, Checkbox...) • Online/Offline • APIs (Camera, GPS, Contacts...)Friday, May 25, 12
    31. 31. UIFriday, May 25, 12
    32. 32. UIFriday, May 25, 12
    33. 33. UIFriday, May 25, 12
    34. 34. UIFriday, May 25, 12
    35. 35. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/Friday, May 25, 12
    36. 36. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/Friday, May 25, 12
    37. 37. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/Friday, May 25, 12
    38. 38. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/Friday, May 25, 12
    39. 39. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    40. 40. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    41. 41. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    42. 42. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    43. 43. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    44. 44. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    45. 45. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    46. 46. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &OfflineFriday, May 25, 12
    47. 47. Friday, May 25, 12
    48. 48. Friday, May 25, 12
    49. 49. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage)Friday, May 25, 12
    50. 50. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage)Friday, May 25, 12
    51. 51. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage)Friday, May 25, 12
    52. 52. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage)Friday, May 25, 12
    53. 53. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven ArchetypeFriday, May 25, 12
    54. 54. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven ArchetypeFriday, May 25, 12
    55. 55. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven ArchetypeFriday, May 25, 12
    56. 56. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven ArchetypeFriday, May 25, 12
    57. 57. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name=com.google.gwt.maps.GoogleMaps />Friday, May 25, 12
    58. 58. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name=com.google.gwt.maps.GoogleMaps />Friday, May 25, 12
    59. 59. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0:lpha a http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name=com.google.gwt.maps.GoogleMaps />Friday, May 25, 12
    60. 60. LOCATION • HTML5 Geolocation • Still no Javascript!!Friday, May 25, 12
    61. 61. LOCATION UserLocation.getLocation(new UserLocationCallback() { @Override public void onLocationFound(Coordinates coords) { getMap(coords); } }); • HTML5 Geolocation • Still no Javascript!!Friday, May 25, 12
    62. 62. LOCATION UserLocation.getLocation(new UserLocationCallback() { @Override public void onLocationFound(Coordinates coords) { getMap(coords); } }); • HTML5 Geolocation • Still no Javascript!!Friday, May 25, 12
    63. 63. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is lockedFriday, May 25, 12
    64. 64. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is lockedFriday, May 25, 12
    65. 65. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is lockedFriday, May 25, 12
    66. 66. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route • The app stops when the device is lockedFriday, May 25, 12
    67. 67. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route Google Maps Polylines • The app stops when the device is lockedFriday, May 25, 12
    68. 68. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route Google Maps Polylines • The app stops when the device is locked PhoneGap?Friday, May 25, 12
    69. 69. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others...Friday, May 25, 12
    70. 70. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others...Friday, May 25, 12
    71. 71. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others...Friday, May 25, 12
    72. 72. BUT WHERE IS THE MAP?!?Friday, May 25, 12
    73. 73. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.comFriday, May 25, 12
    74. 74. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.comFriday, May 25, 12
    75. 75. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.comFriday, May 25, 12
    76. 76. SECOND TRY • Stillwhen the location updates stop when the device is locked!Friday, May 25, 12
    77. 77. SECOND TRY • Stillwhen the location updates stop when the device is locked!Friday, May 25, 12
    78. 78. SECOND TRY Ph on e Ga stop p!! • Still when the location updates when the device is locked! !Friday, May 25, 12
    79. 79. PHONEGAP SETTINGSFriday, May 25, 12
    80. 80. MP3 PLAYER • Local vs Streaming • HTML5 <Audio> • com.phonegap.audiohandlerFriday, May 25, 12
    81. 81. MP3 PLAYER • Local vs Streaming • HTML5 <Audio> • com.phonegap.audiohandlerFriday, May 25, 12
    82. 82. HISTORY • LocalStorage, Javascript wrapper public native static void setItem(String key, String value) /*-{ $wnd.localStorage.setItem(key, value); }-*/; public native static String getItem(String key) /*-{ return $wnd.localStorage.getItem(key); }-*/; • WebSQL • Cookies!! public static String getItem(String key){ return Cookies.getCookie(key); } public static void setItem(String key, String value){ Cookies.setCookie(key, value, new Date(2050, 1, 1), "", "", true); }Friday, May 25, 12
    83. 83. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuthFriday, May 25, 12
    84. 84. MY FRIENDS PLUS.initialize(new SimpleEventBus(), new GoogleApiRequestTransport(APPLICATION_NAME, API_KEY));     final Button b = new Button("Authenticate to get public activities"); • Getting contacts     b.addClickHandler(new ClickHandler() {       @Override       public void onClick(ClickEvent e) {         OAuth2Login.get().authorize(CLIENT_ID, PlusAuthScope.PLUS_ME, new Callback<Void, Exception>() {       @Override phoneGap.getContacts()       public void onSuccess(Void v) {         PLUS.people().get("me").to(new Receiver<Person>() {       @Override • Social login       public void onSuccess(Person person) {         println("Hello " + person.getDisplayName());       }     }).fire();       }           @Override gwt-google-apis   public void onFailure(Exception e) {         println(e.getMessage());       }     });       }     }); & OAuthFriday, May 25, 12
    85. 85. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuthFriday, May 25, 12
    86. 86. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuth lug in browser p egap child PhonFriday, May 25, 12
    87. 87. PHONEGAP PLUGIN • Android http://wiki.phonegap.com/w/page/43708611/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20Android plugins.xml <plugin name="BatteryLevelPlugin" value="com.example.BatteryLevelPlugin" /> • iOS http://wiki.phonegap.com/w/page/43708792/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20iOS plugins folder: .m .h files phonegap.plist: www folder: javascript filesFriday, May 25, 12
    88. 88. SWIPE PANEL • Google+ • Built in widget in Sencha and other frameworks • not in mGWT!?! • Wrapping Javascript with JSNI?Friday, May 25, 12
    89. 89. SWIPE PANEL • Google+ • Built in widget in Sencha and other frameworks • not in mGWT!?! • Wrapping Javascript with JSNI?Friday, May 25, 12
    90. 90. JSNIFriday, May 25, 12
    91. 91. JSNIFriday, May 25, 12
    92. 92. JSNIFriday, May 25, 12
    93. 93. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    94. 94. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    95. 95. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    96. 96. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    97. 97. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    98. 98. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    99. 99. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwtFriday, May 25, 12
    100. 100. OK THEN...Friday, May 25, 12
    101. 101. OK THEN...Friday, May 25, 12
    102. 102. OK THEN...Friday, May 25, 12
    103. 103. LATEST NEWS!!!Friday, May 25, 12
    104. 104. LATEST NEWS!!!Friday, May 25, 12
    105. 105. LATEST NEWS!!!Friday, May 25, 12
    106. 106. PHONEGAP - CORDOVA • Apache Cordova Incubator • 1.3<problem<1.7 • Cordova 1.7 - GwtPhonegap 1.7 + mGWT 1.1 (Snapshot)Friday, May 25, 12
    107. 107. DEBUGGING • Desktop: First Class Java Debugging • Mobil: Gwt Pretty Compile! iOS: Remote debugging of HTML and JS on device - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ! [NSClassFromString(@"WebView") _enableRemoteInspector]; Android: Chrome Beta? Most probably will be available soonFriday, May 25, 12
    108. 108. LOCATION DEBUG • Go out!!! • Also only on iOS :(Friday, May 25, 12
    109. 109. CONCLUSION • MGWT + PhoneGap works! Not a silverbullet but sill great! • Only way to connect backend JSONP (JSON with Padding) • JSNI is very easy... BUT! be careful when touch events are involved! • Browse Phonegap plugins before going native! • Test location on field. • Don’t forget to add urls to permissions listFriday, May 25, 12
    110. 110. Like the talk... A Hall14:30 and Matt Raible Devoxx 2011 </PRESENTATION> murat@muratyener.com blogs.eteration.com devchronicles.com @yenerm 114028338330916709688Friday, May 25, 12
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×