Sunday, March 9, 2008

Gears on Mobile

On seeing the title if you think am going to discuss about shifting Gears in automobiles then am sorry!! Its about Google Gears support for Windows Mobile (WinMo) devices. If you have any web application that works in Windows Mobile, then you could look at the latest release of Google Gears for offline support. The current release supports Windows Mobile 5 & 6.

During the Gears for Mobile launch, two web applications have used Google Gears for their offline support.

Zoho Writer: An online word processor extended offline support for their Windows Mobile edition. To access the mobile version visit: http://mobile.zoho.com. The desktop/laptop (computer) version of Writer is available at http://writer.zoho.com.

Buxfer: A personal finance web application visit http://m.buxfer.com

There is no change in API for desktop and Mobile edtions. However if you are using old gears_init.js then you may have update with the latest one available @ http://code.google.com/apis/gears/gears_init.js

Fore more details:

http://googlemobile.blogspot.com/2008/03/shifting-google-gears-to-mobile.html
http://google-code-updates.blogspot.com/2008/03/power-up-your-mobile-web-applications.html
http://code.google.com/apis/gears/mobile.html

Google Gears API: ResourceStore Module

In this post you will find code snippet for ResourceStore of LocalServer Module.

function localserver()
{
var localserver = google.gears.factory.create('beta.localserver', '1.0');
var store = localserver.createStore('mystore');
store = localserver.openStore('mystore');
var files=['/images/myimage.gif']
var captureId=store.capture(files,callback);
}
function callback()
{
alert('files are captured');
}


Ensure that you have the gears_init.js file to use above methods. For other methods refer:

http://code.google.com/apis/gears/api_localserver.html
http://code.google.com/apis/gears/api_localserver.html#ResourceStore