Pete Freitag Pete Freitag

Building iPhone Android Apps with jQuery Mobile and PhoneGap Slides

Updated on November 17, 2023
By Pete Freitag
web

I gave a presentation to my local ColdFusion users group in December on Building Mobile Apps for iOS (iPhone, iPod, iPad) and Android devices using jQuery Mobile, and PhoneGap. The presentation focused more on jQueryMobile than PhoneGap, since phonegap is pretty straight forward once you have setup an example project. You can find the jQueryMobile PhoneGap Slides here and the code samples.

jQuery Mobile

I've been working with jQuery Mobile fairly regularly since the day Alpha 1 came out a few months ago. It's a very easy to get started with jQuery Mobile, if you know HTML (or HTML5) you are halfway there. That' right even though much of jQueryMobile is written in javascript, you don't actually need to know any jQuery or even JavaScript to do some basic things with it. But if you do know javascript and you do know jQuery you will love it even more. I'm often keeping tabs on the jQuery mobile git repository, I'm hopeful that another release will be out soon, they had stated that the 1.0 release will be out in January, but I am doubtful of that since it is still in Alpha, and we haven't seen a beta. Some of the promised features such as date picker aren't really there yet (though there is some work being done in the latest from git).

PhoneGap

I've been working with PhoneGap even longer that I have with jQuery Mobile. If your not familiar with PhoneGap, it provides a set of project templates and a common javascript API for building native mobile applications. It supports iOS, Android, Blackberry, Symbian, and Palm. The JavaScript API allows you to interact with the native API's for things such as contact management, camera, GPS, accelerometer, etc.

Overall PhoneGap and jQuery Mobile make a great combo for any web developer looking to get into mobile application development.

Here's an iPhone App I built for one of my clients using PhoneGap and jQuery Mobile to allow members of their site Golf Score Keeper to track their golf scores and stats on their Phone. Android version will be coming soon.

I'm also using jQuery Mobile with PhoneGap to build a mileage tracking & reimbursement app.



iphone ios jquery jquerymobile android phonegap mobile

Building iPhone Android Apps with jQuery Mobile and PhoneGap Slides was first published on January 12, 2011.

If you like reading about iphone, ios, jquery, jquerymobile, android, phonegap, or mobile then you might also like:

Discuss / Follow me on Twitter ↯

Comments

I cannot get Phonegap to work for Android. The Javascript doesn't seem to work because when I clicked on "Beep" in the Phonegap example, it crashed. Have you tried it for Android?
by Phil on 01/12/2011 at 5:58:50 PM UTC
I cannot get phonegap/jquery mobile to work as well with android emulator. I used your sample htmls, the page loads for a sec or so, and it disappears back to the apps listing. Any ideas ? Using Android 2.3, jquery 1.4.4, phonegap 0.9.3, jquerymobile 1.0-a2.

Thanks
by pady on 01/25/2011 at 12:21:42 PM UTC
@Pady @Phil - Try running the Android 2.2 simulator and see if that fixes the problem. I'll have to look into this some more.
by Pete Freitag on 01/25/2011 at 12:51:03 PM UTC
If you are having issues running PhoneGap on Android 2.3 (Gingerbread) simulator, it is apparently a bug that exists only in the simulator (phonegap apps are working fine on actual 2.3 devices so far) See this link for more info: http://phonegap.lighthouseapp.com/projects/20118/tickets/61-sample-app-does-not-run-on-23
by Pete Freitag on 01/25/2011 at 3:31:42 PM UTC
@Pete Great slide set!

See http://wiki.phonegap.com/w/page/34483744/PhoneGap-Eclipse-PlugIn-for-Android for a simpler Phonegap Android Eclipse experience.

It also includes templates for jQuery Mobile and Sencha Touch projects.
by Paul on 01/25/2011 at 5:21:47 PM UTC
The Android 2.3 emulator bug is described at http://code.google.com/p/android/issues/detail?id=12987. The WebView JavaScript to Java bridge is broken which implies that no PhoneGap apps can work. Star it to encourage the Android team to fix quicker.
by Paul on 01/25/2011 at 5:26:08 PM UTC
@Paul - That Eclipse plugin looks great, I'll certainly check it out! And thanks for the link to the bug, voted.
by Pete Freitag on 01/25/2011 at 9:15:01 PM UTC
For Blackberry, i have a good app to tracking people by gps software.I am a fan. Do you recommend anyone for android?


Peter
blog:www.thegpstrackingblog.com
by Peter(thegpstracker) on 05/26/2011 at 10:52:56 AM UTC