Recently a client asked us to develop an app for number of mobile platforms.
The app had some form fields, had to capture photo’s using the camera and send an email with the photo as an attachment and the form fields as data. Lastly the app had to get the location and add it to the data.
A year or two ago we tried HTML5 and Phonegap and found it buggy and unusable for serious development, but we have steadily been using more and more HTML5 elements in our Apps. Hybrid Apps (native apps with native UI screens in some parts and HTML5 screens in other parts) allow you to port the web parts easily from iPhone to Android or vice versa. Since the HTML5 buzz has been picking up this year i decided to give Phonegap a try. The phonegap support organization was acquired by Adobe last year coinciding neatly with the demise of flash-mobile. So phonegap has serious clout behind it. Something i wonder about with the other 100 or so web-to-app products.
If the client agrees at some point i might post the code and screenshots.
From Phonegap newbie to up-and-running developer in 2 hours. The download for iOS worked as expected. Within half a day i managed to change the sample code to something resembling a prototype for my app. Pretty cool. I added JQuery Mobile for some instantly cool user interface widgets. Calling the camera and location services was well documented. The location services did what i wanted out of the box. The camera call took a little tweaking and then the camera view opened up on device.
For our intended use, phonegap and HTML5 are not there yet. If we hadn’t done a proof of concept we would have run into serious problems during development. But for many apps Phonegap/HTML5 it is a feasible development strategy. The trick is in deciding which apps can be succesfully developed in phonegap/HTML5 and avoiding the “If you’ve got a hammer everything looks like a nail” bias. Phonegap and HTML5 are pushing mobile webbrowser limits and it is important not to unwittingly end up on the bleeding edge of this technology.
Update: Today i updated the iOS device to the latest version (5.1.1) and the camera function works without problems. Seems like the camera function is severely buggy in 5.0.x iOS versions, but works in the latest iOS. So Apple have fixed their webkit bug. Although this still rules out production use for a while until iOS 5.0.x can safely be ignored, it gives hope for the future of camera enabled HTML5 apps on iOS. When i find time, i’ll try on a couple of Android devices.