Saturday 1 June 2013

Live Gadget Previews

The iGoogle Apparatus Agenda just got better. Users can now collaborate with a apparatus in the agenda afore abacus it to their page. Accept a attending at a brace examples like the Google News or Google Hot Trends gadgets. 

Your accessories can accept reside previews too. Accessories that use Agreeable view="default" already accept a reside examination in the apparatus directory. Remember, view="default" can bout any appearance accurate by the container. Similarly, if the Agreeable aspect in a apparatus doesn't specify the appearance attribute, that's advised the aforementioned as if view="default" were present. Up until now, the alone angle that were accurate on iGoogle were home and canvas; remember, home is the abate adaptation and canvas is the beyond version. 

Some accessories are customized to affectation abnormally for the home and canvas views. If your accessories do this, you can amend the apparatus XML blueprint to add a different appearance for the examination or reclaim an absolute agreeable element.
For accessories with an aspect
In this case you can just add preview, so you'll accept view="home,canvas,preview". 

For accessories with
Here too, you can reclaim the home appearance for the examination by alteration your blueprint to view="home,preview". 

There are some added restrictions on the way the examination works. A examination can't use OpenSocial calls - back the user hasn't set the OpenSocial permissions afore installing the gadget. You may wish to abode this in your apparatus by authoritative a appropriate examination adaptation that uses some copy data, or you can opt out of the reside examination and stick with a changeless screenshot. 

Like all apparatus views, the examination is cached. This reduces amount and speeds up confined for users. But if you're alive on your apparatus and don't see a contempo change in the preview, you can attenuate caching briefly by abacus the constant "nocache=1" to the url. 

Gadgets displayed as a examination aswell can't cross to added angle application requestNavigateTo(). If your apparatus has a hotlink that triggers alteration the appearance it will not plan in the preview.
If you feel a examination isn't the appropriate best for your apparatus again specify the added angle (home & canvas) and be abiding that your screenshot does a acceptable job of carrying what your apparatus will do for users. 

As always, appear to the iGoogle Developer Forum to allocution about reside apparatus previews with added iGoogle developers.