Developing GMail Apps (gadgets) with full (Canvas) view

Do you like this story?      

In one of the previous posts , we saw about how to add iGoogle gadgets to GMail.These GMail gadgets need not be only in the small sidebar, which of less than 200 pixels width.

Since iGoogle now supports gadgets with Canvas view, GMail gadgets can also be with canvas view (full view).
We will see how to develop a simple GMail app, with Canvas view enabled.If you can code html, check the simplest form of a Google gadget below.
 Google Gadget
 The Gmail gadgets are same as Google gadgets, just appearing in the GMail page.For the Canvas view application in GMail, the ModulePrefs tag should look like
 

Here, we have enabled different type of views, Canvas and default using <Require feature=”views”/>And maximizing the gadget is enabled using <Optional feature=”maximize”/>

 Let us now go to the sidebar view part (i.e the default view.It should look like,

The link, javascript:goToView(‘canvas’) can take us to the full view.Even the sidebar can some content which can be coded in the above CDATA section.Now the Canvas view can have the basic form as below.

The complete xml file should be like,

After coding the complete gadget as above, upload the xml file somewhere.
Now, you have the xml file uploaded somewhere, and its url ready.

How to add the gadget application to GMail?
 1. In Labs tab, under Gmail Settings, Enable “Add any gadget by URL” feature, Save changes.
 2. Now Go to the Gadgets tab in Gmail settings.
 3. Give the gadget xml file’s url, and add the gadget. (for eg, http://www.google.com/ig/modules/datetime.xml)

 Twitter application for GMail