Location Weirdness

My current work project is a smart phone version of our mobile website. The fun part of this kind of development is working around the weirdness of a few mobile browsers, without breaking the functionality of the majority. The problem children more often than not are the Android phones, there is always one of them with some strange issue. Case in point, how the HTML 5 Location services are handled on the Motorola Droid 3. Don’t get me wrong, the phone is great. It is dual core fast, has an amazing display, and a great keyboard. My problem is one of those things only a developer would ever know about.

The problem is about event generated when location tracking is denied by the user. Every other phone in our garage, generates a “LocationDenied”, event in response. The Droid 3 generates a “LocationFailed”. While these events are close, they are not the same thing. Location Failed is for when the phone unable to determine its location, for example when it is underground or something. Location denied is when the user has said, “No,” to tracking. This little problem took me about half an hour to find and fix, but the bug isn’t in my code, it is in the browser’s.

So if you want to develop for the mobile web, be prepared for these kind of issues. JQuery, and JQuery Mobile can help to eliminate a lot of these kinds of issues, but not all of them. Be ready for weirdness.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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