Geolocation – Setting your position manually

I thought that this was written down somwhere, but I couldn’t easily find it…. so

If you know how to muck with about:config, there is an easy way to set your location manually.  First figure out your longitude and latitude.  There area bunch of tools on the web that gets you this.  Once you have this, you can do the following:

1) Open up about:config

2) search for geo.wifi.uri

3) change the value to:

http://snaptome.appspot.com/loc/json?latitude=your_lat&longitude=your_lon&accuracy=10

Thats it.  I hope this helps.

Posted in mozilla | Tagged , , | 14 Comments

Desktop Notifications

This is a feature that may come to a browser some day.  I am interesting in your thoughts:

Desktop Notifications

Desktop notifications allow a web page to notify the user using system level services, such as Growl, in a clean, safe, and easy to use manner.

The code is very simple:

navigator.notification.notify("Another Desktop Notification",
                              "Check out my icon",
                              "http://dougt.org/me.jpg");

and the result is something you’d expect from a notification.  On the Mac, the notification may look like:

You can get more sophisticated by adding a callback when the user clicks on the Desktop Notification:

navigator.notification.notify("Another Desktop Notification",
                              "Check out my icon",
                              "http://dougt.org/me.jpg");
                              function() { /*do something*/ });

A user must grant each site permission before they can use Desktop Notifications.  We will use the familiar notification bar (the text isn’t final.  Also, these will end up looking quite different in future releases of Firefox.):

That is there all there is to it!

Get involved:

If you like or dislike this feature, please just leave a comment.

If you like to follow the implementation details, you can follow bug 573588.

You can try out the engineering builds.  There are bound to be a few bugz.  If you see anything funky, please let me know.

If you are using the above engineering builds, you can try out Desktop Notifications.

More details:

I reviewed two draft specifications.  The first is the WebNotification specification and the other is the Google Gears NotificationAPI.  I found both of these APIs more complex than what was required.  Clearly both of these other APIs have use cases that are not address by my proposal.  But for basic notification from the browser, not much is required.

Looking at what Growl and other system level notification services provide, you basically only need a title, a description, and an icon.  For fun, I added one callback if the user clicks on the notification while it is on screen.

Next Steps

You tell me.  Is this something you’d like to see in the browser?  Does the API work for your use cases?

Let me know what you think!

Posted in General, mozilla | Tagged , , , , | 52 Comments

Opera 10.6 Beta – Geolocation

Oh, cool!  Opera has geolocation!

Opera employees do lots of heavy lifting on standards.  During my involvement at the geolocation working group, I saw first hand the great to work that the Opera folks do (Hi Lars-Erik + Max!).  And it is really great to see that this work be put into a product and shipped.

I spend a bit of time looking at 10.6 and their geo implementation.  The info bar has the basic elements that a geolocation notification bar is suppose to have.  I will leave it to the Opera users to decided if this is a pretty notification bar or not… Notice that they did leave off a informational link that allows a user to get more information each time a geolocation request is performed.  We left that on so that people away can find a way back to the explanation of geolocation.  I also like the wording on the prompt… the browser shares the location data with the web page, but we do not transmit or send data.  It is a minor difference, but if the location is transmitted it is really the page that does it.

Geolocation info bar in Opera

The first time you click “Share My Location”, you get a big modal dialog with a bunch of legalize in it that explain what geolocation is, and how it is used in Opera, and what providers, etc.  The text is pretty dense and will probably scare most people away.  I suppose much of the text is similar to the Firefox text.  There are some word smithing that could be done, but its a beta and Opera is probably still working on it.

Under the hood, Opera does use https when transmitting the geolocation data to and from Google’s Location Service.  They also expire the service cookie every two weeks and offer a way for the user to purge this value more frequently.  In my quick conformance tests, it looks like Opera behaves much like Firefox.

Overall, I am pretty happy with Opera’s Geolocation implementation.  Go Opera.  (btw, do I still get a t-shirt for saying that?)

Posted in mozilla | Tagged , , , | 6 Comments

Got Android? We need you…

Mozilla has started to produce nightly builds of Fennec for Android.  You can get them here:

http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/fennec.apk

No auto-updating yet, so check back often.  Send your feedback to the forum.

Posted in mozilla | Tagged , , , | 4 Comments