By

PhoneGap Demo Application - The First 24 Hours

Right now Andre is down at the Web2Expo, and is going to be presenting PhoneGap. The past couple of days, I've been working on the PhoneGap application, and I had to get it to Andre (I did a recent fix to Accelerometer, making it more in line with the new API). I signed the app and posted it here, however that didn't work for Andre to get it on the phone. Andre then said to post it to the Android Market, and I did, even though I know that Beep does not work.

Why beep didn't work until this morning:

Well, anyone who says that Java doesn't have NullPointerExceptions is LYING! The whole concept of PhoneGap is to use Javascript to gain access to the APIs. However, there is an issue that I kept running into with the latest version of Android when adding APIs, and that is that WebKit often throws an exception on certain methods or interfaces (like the Device interface) when it tries to call it. This is a pretty HUGE bug for this version of Android, and it's caused by not calling the right Java interface.

So, if you do something stupid like this:

Device.do_stuff();

And do_stuff() doesn't exist, you would expect a Javascript error, right? Well, instead you get a misleading NullPointerExtension. This is rather bad behaviour, and shows that they aren't checking for nulls in this. I'm going to write a proof of concept and send it to Google, but this bug is a pretty serious flaw in the Android SDK for obvious reasons.

Overall Success

Despite the Beep Drawback, things seem to be going well for the first 24 hours of PhoneGap on the Android Market. I'm hopefully going to have my first free Java application up to the Android market in the next couple of weeks as well. Now that we have one published Android App, we're going to try for more!