Creating the Gadget XML
The Gadget XML, which displays the StartURL of the application, must be made public in the Mobage API of a partner server. If this file does not exist or the URL is incorrect, the application will not run.
Module Element
The Module Element is the root elements of the Gadget XML.
ModulePrefs Elements
The ModulePrefs Elements contain the meta-information of the application. They are a component of the Module element, and you will need to supply one of them.
| Attribute | Value | Required |
|---|---|---|
| Title | The title of the application | Y |
Required Elements
The Required Elements designate the additional functions in the application.
| Attribute | Value | Required |
|---|---|---|
| Feature | Value shown below | Y |
Support features
| Name | Function |
|---|---|
| OpenSocial-0.8 | A function that allows you to use OpenSocial JS API v0.8.1 |
| Flash | A function that allows you to embed Flash contents |
| Views | A function that allows you to manipulate the views |
| Dynamic-height | A function that allows you to manipulate the display of such things as the size of the application. |
| tabs | A function that allows you to manipulate the tabs |
| mbga | Original function of Mobage Openplatform |
Content Elements
The Content Elements describe contents. They are a component of the Module elements, and you will need to supply at least one of them.
For mobile devices
| Attribute | Value | Required |
|---|---|---|
| View | Mobile | Y |
| Type | URL | Y |
| href | Starting URL of the application | Y |
For Smartphone
| Attribute | Value | Required |
|---|---|---|
| View | touch | Y |
| Type | URL | Y |
| href | Starting URL of the application | Y |
For PC
| Attribute | Value | Required |
|---|---|---|
| View | Canvas | Y |
| Type | HTML | Y |
outputs a DOCTYPE
| Attribute | Value | Required |
|---|---|---|
| quirks | if this parameter is true ,the DOCTYPE declaration is not output. Otherwise, output. |
sample
For mobile devices
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Sample Application"></ModulePrefs>
<Content view="mobile" type="url" href="http://www.example.com/index.html" />
</Module>
For Smartphone
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Sample Application"></ModulePrefs>
<Content view="touch" type="url" href="http://www.example.com/index.html" />
</Module>
For PC
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Hello, world">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html" view="canvas"><![CDATA[
Hello, world!
]]></Content>
</Module>
ALL supported
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Hello, world">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html" view="canvas"><![CDATA[
Hello, world!
]]></Content>
<Content view="mobile" type="url" href="http://www.example.com/index.html" />
<Content view="touch" type="url" href="http://www.example.com/touch/index.html" />
</Module>
Revision History
- 12/2010
- Initial Release.