First, follow the Modifying Hello World tutorial. It leads you through downloading the SDK, modifying a sample gadget's XML and JavaScript files, and packaging the modified gadget. After finishing the tutorial, you should be ready to start exploring the Desktop gadget API.
Be sure to have an up-to-date copy of the Google Desktop SDK. In it you'll find many sample gadgets demonstrating how to use the API, plus helpful tools such as the Gadget Designer.
Once you're ready to start creating your own gadgets, you can find most of the information you need in the API documentation and the development articles. The documentation includes everything from tutorials to API references. The ever-growing collection of articles has answers to commonly asked questions, plus how-to pages and recommendations for good gadget-writing practices.
Finally, make a habit of visiting the Google Desktop APIs blog, where you can find the latest news for Desktop gadget developers; don't miss the Tips.
If you have any questions, visit our developer discussion group.
Search past messages to see if your problem has already been discussed or post a new message to request help.
Currently, Desktop gadgets run on Windows, Mac, and Linux. Therefore, aim at all times to write cross-platform gadgets and follow the instructions in the Writing a Cross-Platform Gadget doc.
Yes, a Gadget Designer is available in the SDK.
The Google Desktop Gadget Designer is an integrated development environment (IDE) that lets you quickly prototype or modify your gadget's UI and test its performance.
Be sure to check out the documentation and tutorial.
Double-click (i.e. execute) the gadget.gmanifest
file located in your gadget's root directory. This starts the gadget.
If you happen to be using the Gadget Designer IDE, you can preview the gadget instantly within the Designer.
Perhaps you've found a gadget you really like and want to learn how a certain feature was implemented.
The directory My Documents\My Google Gadgets
on your machine contains all the script-based Google Desktop gadgets you've installed.
These .gg files are actually zip archives. Unzip the .gg file (you may need to change the extension to .zip first if your archive utility requires it), and you'll be able to see all the source files.
Keep in mind not all gadgets are the script-based .gg type. Some gadgets you have installed may be older, non-script gadgets or web-based gadgets.
Google Desktop gadgets are packaged as .gg files.
A .gg file is simply a zip archive with a .gg extension. You can zip up all your gadget files and subdirectories and then rename the zipped file so it has the .gg suffix.
Or you can use the Gadget Designer tool to build the package for you. The menu command for this is "Project -> Build Package".
To submit your gadget, visit http://desktop.google.com/pluginsubmit.
Your gadget must be approved before it shows up on the directory, so be sure to follow all the listed guidelines.
JavaScript is the preferred language for Google Desktop gadgets. VBScript gadgets do exist, but are uncommon.
It is possible to write gadgets in C#, VB.NET, C or C++, but there are convincing reasons not to:
There are no plans to support Java.
<id>
tag of gadget.gmanifest
. So be careful if you are creating a new gadget based off an old gadget; you won't be able to run both at the same time!uuidgen
, Guidgen.exe
, or Uuidgen.exe
. If you don't have any of those tools, search the Web for [uuid generator]
.
Thumbs.db
or backup files in your .gg file.For submission type Desktop gadget, you can only submit .gg files. Executables (.exe) or zip files are no longer accepted.
Executables (.exe) or zip files are allowed for types Indexing Plug-in and Separate application that integrates with Google Desktop.
To update your gadget, simply re-upload the new version to the same URL. Also, make sure to increment your version number so that it appears in the Updates section of users' Add Gadgets dialog.
To change the information for your gadget, simply modify the metadata in your hosted gadget's gmanifest file. Our server will pick up changes to your hosted gadget file and update the displayed information in the directory. To read more about what information is contained in the gmanifest file, please visit the following page:
http://code.google.com/apis/desktop/docs/script.html#gmanifest
Once your gadget is published, you can update its images in two ways. You can
change the values of thumbnailUrl
and screenshotUrl
in the
gmanifest for your
gadget's published .gg file. Or you can just update the images, while retaining the same
URLs.
Gadgets are brought into the listings depending on their popularity in iGoogle and usability in Google Desktop.
By usability, we mean if your gadget does not work well in Google Desktop for whatever reason, it won't be added.
If a gadget's download link is broken for several consecutive weeks, the gadget may be removed from the gallery automatically. We cannot restore the gadget for you. Please submit it again — and fix the download link, of course.
No, the gadget API uses XML and JavaScript. It is not HTML based.
If you need to display HTML in your gadget, consider using an HTML details view or developing an web-based gadget, which are supported by Google Desktop.
In order for an element to process events, its enabled
property must be set to true
. For example, here is an image that properly sets up an onclick
handler:
<img src="red.jpg" enabled="true" onclick="onClick();" />
Please refer to this discussion:
You must escape the backslash character in JavaScript strings. For example:
var path = "c:\\foo\\bar.txt";
According to the Google Desktop API Terms & Conditions, any Plug-Ins (or gadgets) created using the API can be distributed or sold for commercial use:
"You may use, display and/or distribute your Plug-Ins commercially as well as non-commercially. In any case, your Plug-Ins must comply with these API Terms and Conditions, including the Prohibited Actions section below."
However, Google Desktop itself or its APIs cannot be distributed or sold for commercial use without prior written consent from Google:
"However, the APIs are made available to you for your non-commercial use only, meaning, that you may use it at work or at home, but, except for distributions for internal business and/or personal use to your employees or contractors in compliance with the Google Desktop Terms and Conditions and the APIs Terms and Conditions, you may not display, distribute or otherwise make Google Desktop or the APIs available to any third party without Google's prior written consent."
framework.openUrl('http://desktop.google.com/');
To manually add an web-based gadget to the Google Desktop sidebar:
http://coolgadgets.googlepages.com/krad-gadget.xml
The search box has a limit of 100 characters. If your URL exceeds that, you can use a service such as http://tinyurl.com/ as a workaround.
NOTE: The gadget must be publicly hosted. This will not work if the gadget is on your file system, internal webserver, etc. Since the gadget already needs to be publicly hosted to work with the iGoogle page, this shouldn't be an issue.
The DigitalClockFont sample in the SDK uses a custom font to achieve the LCD number effect; the comments within the code may provide some insight.
Also, refer to the section of the following document where the <install>
tag is discussed:
http://code.google.com/apis/desktop/docs/script.html#gmanifest
Send an email to gd-developer AT google DOT com with the following:
This is a secret, more tightly guarded than the PageRank algorithm. Only one person on the planet knows, and he/she will hold the secret to the grave.
Some HOF optimization consultants speculate that the ranking is based on the following:
These are gadgets that have submitted but have not been released yet. Please feel free to try them out and assist the author. Or just use them to spy on the competition!
DISCLAIMER: Google has not tested or verified the features or security of the gadgets. Please direct all questions to the software's author.
API Gurus watch the developer group, answering questions and providing valuable feedback.
Interested in becoming an API Guru? Send an email to gd-developer AT google DOT com.
Student Ambassadors have volunteered to be the contact point for Desktop developers at a particular school or university. If you like organizing events such as programming contests and technical talks, becoming an ambassador is a great opportunity to help your fellow students and develop leadership skills.
Interested in becoming a Student Ambassador? Send an email to gd-developer AT google DOT com.