Gears 0.4 is here!




But where exactly is 'here'? Well, that's a question that takes on a whole new meaning with this new release of Gears: we have added a new Geolocation API, which allows you to build applications that can do new and exciting things based on your users' location. You can query Gears for the user's current location using the getCurrentPosition() method or you can ask Gears to notify you every time the location changes, using the watchPosition() method. Of course, we take privacy issues very seriously, which is why we have a special permission dialog that allows users to decide which Web sites should have access to their location information. If you want to learn more about how the Geolocation API works, please see the Google Code blog post.

Another cool new feature is the Blob API. Unlike strings, blobs let you reference arbitrary binary data — a first for JavaScript! Therefore, blobs can more naturally represent things like files and images, and they can be passed around efficiently. We have updated several existing APIs to work with blobs, such as WorkerPool sendMessage() and HttpRequest send(). And that's not all! We have also extended the Desktop API with a new method, openFiles(), which allows users to select multiple files of a particular content type, and then returns them as blobs for easy uploading or worker processing.

Other major changes in Gears 0.4 include:

For the full list of changes, you can check out the Gears API history.

If you are a developer anxious to try these new APIs, first check gears.google.com to make sure you have Gears 0.4 installed (your browser should be updated automatically) and then browse the Gears documentation pages. If you are a mobile developer, please make sure you also read our Google Mobile blog post to learn more details about what devices support the Geolocation API.

Finally, an update on how we are doing on Web standards: in line with our earlier promises, the Geolocation API is a W3C Editor's draft and its current design is a result of open collaboration with many other people and organizations. We plan to continue to drive this standardization effort, as well work with the community on new Web standards.