By Adam Nagy
When writing applications for multiple platforms the obvious choice could be web technologies that would work in any browser on any device. At the moment that would not provide though the following:
- access platform specific functionality: camera, push notifications, etc.
- ability to sell your app on the various platform dependent app stores
The solution could be creating native applications that would host a web viewer which would provide the majority of the functionality through HTML, CSS and JavaScript. That is exactly what PhoneGap from Adobe provides with the added benefit of not having to create the platform specific frameworks yourself. You can just provide the web part and the rest could be taken care of by the PhoneGap Build functionality. This is free for public projects plus a single private project. Beyond that you would need to pay for the service.
Another cool feature of this solution is the ability to debug into your application on a specific device through a web browser and that you can easily push the latest version of your project to the test device using Hydration.
There is a good tutorial on getting started with PhoneGap: Tutorial: Developing a PhoneGap Application
Before doing the above it might be worth setting up a GitHub account, adding a new repository and then setting up the sample tutorial to save to that online repository and using that on https://build.phonegap.com/apps so that it will be really easy to keep the app on the test device up-to-date.
Since I'm using Eclipse for the Android development I used the EGit plugin. There is a nice tutorial for setting that up too: http://www.vogella.com/articles/EGit/article.html
Nothing is ever straight forward. I had issues with pushing my Eclipse project to GitHub, then the PhoneGap build did not work because of server issues, then the above tutorial project did not work becasue of a loading issue. :( The letter could be solved using this: Fix for PhoneGap: Connection to server was unsuccessful
For a long time I could not make the onilne debugger work. I think they had issues with the server. Today I managed to use it. The webpage takes you through the 3 simple steps to look into your running application: http:\\debug.phonegap.com
So I needed to update my index.html with the script tag (I placed it inside the <header> section) - just to be on the safe side I also added it to main.html. :) Then I just pushed the latest version to github from Eclipse. Then clicked "Update code" on the phonegap build site, downloaded the latest version to my Android device and started it. Then when I when to the phonegap debugger site I could see my device listed. When I clicked the "Elements" button I could see and change the html content of my app on the mobile device. :)
Overview of alternative ways of debugging your app: https://github.com/phonegap/phonegap/wiki/Debugging-in-PhoneGap
If you are interested in this sort of technology then it's worth looking around a bit on the net to find the best one for you as there are many solutions similar to PhoneGap. There are differences between what they offer and the price they charge you.
Comments
You can follow this conversation by subscribing to the comment feed for this post.