Sunday, October 10, 2010

GWT and Phonegap

When I first read about Phonegap more than a year ago I was very excited that mobile developement can be done in javascript without loosing the ability to access the device hardware.

Even better this can be done in a platform independent way. Because at the time I was also building webapps for the iPhone I found phonegap to be an ideal way to use the same webapp on the phone. Repack your app with phonegap (as a native app) and boom you can access the hardware (Contacts, Accelerometer, GPS, Filesystem, Database, etc.).


But I was developing webapps in GWT and so there was one puzzle piece missing to get GWT and Phongap running nicely together: A phonegap js wrapper for GWT. After apple lowered the restrictions on the app store I decided to share this library as the gwt-phonegap project on google code.

The release is still in an early stage, but if you like to try it out there is a show case project illustrating the usage.

I tested the project on my iPhone, iPad and android phone (milestone) and they work (mostly) fine. Running on blackberry OS < 6.0 seems impossible because their old browser is .... Luckily they replaced the browser on the new Blackberry OS with webkit. So we should be able to run GWT there as well.


Nextup I plan to share the widgets I made for the iPhone in GWT, but I`ll be waiting for GWT 2.1 because lots of the animation stuff I wrote can be handled much better in GWT 2.1.


Finally here are some screenshots of the showcase:





3 comments:

  1. Hi - I'm interested in trying out your Showcase example to try out PhoneGap. When I build with the POM in the showcase folder I just end up with a jar and don't see th ecompile GWT js. Is there another build process I should use to have the war project created?

    ReplyDelete
  2. Hi Alex,

    I`m going to update the showcase to have a working maven build (using the gwt-maven plugin)

    ReplyDelete
  3. Hi, your project is quite cool and interesting ! Phonegap has diff libs for android, iphone and blackberry like Phonegap-android, Phonegap-iphone etc. Which one does this project use in gwt ? Is it targeted for anyone in particular ?

    ReplyDelete