PhoneGap Android, jQuery Mobile, HTML5 Canvas, and Touch-based Drawing

This is the PhoneGap version of the jQuery Mobile touch-based drawing programing. For the most part all of the HTML and JavaScript remains the same between the two versions. There are only a few difference which should be explained. If you haven’t read the previous post, you should before continuing.

jQuery Mobile, HTML5 Canvas, & Touch-based Drawing.


The easiest way to handle orientation in an Android application is not to,simply supporting portrait would be enough. So I made the following change to the tag in the manifest:

    android:label=“@string/title_activity_main” >

Since we don’t seem to receive orientationchange events from within the app’s code I removed the event handler for it and the resize event. 

Other than those two changes the rest of the code was lifted as is from the web version of the application. The complete source code is in my GitHub repo. It is for Android and the Eclipse IDE. Hopefully a little later in the week I will do a Intellij IDEA version and also the iOS version. Widgets


6 thoughts on “PhoneGap Android, jQuery Mobile, HTML5 Canvas, and Touch-based Drawing

  1. Wow, I copied the appropriate code from your Android project into a minimal working iOS phonegap project that I already had, and it worked the first time, on all versions of the iPhone and iPad simulators!

    Your code must be very solid for it to do that.

    Cheers, Jerry


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s