Skip to main content

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.

AttributeValueRequired
TitleThe title of the applicationY

Required Elements​

The Required Elements designate the additional functions in the application.

AttributeValueRequired
FeatureValue shown belowY

Support features

NameFunction
OpenSocial-0.8A function that allows you to use OpenSocial JS API v0.8.1
FlashA function that allows you to embed Flash contents
ViewsA function that allows you to manipulate the views
Dynamic-heightA function that allows you to manipulate the display of such things as the size of the application.
tabsA function that allows you to manipulate the tabs
mbgaOriginal 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​

AttributeValueRequired
ViewMobileY
TypeURLY
hrefStarting URL of the applicationY

For Smartphone​

AttributeValueRequired
ViewtouchY
TypeURLY
hrefStarting URL of the applicationY

For PC​

AttributeValueRequired
ViewCanvasY
TypeHTMLY

outputs a DOCTYPE​

AttributeValueRequired
quirksif 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.
  • Module Element
  • ModulePrefs Elements
  • Required Elements
  • Content Elements
    • For mobile devices
    • For Smartphone
    • For PC
    • outputs a DOCTYPE
  • sample
    • For mobile devices
    • For Smartphone
    • For PC
    • ALL supported
  • Revision History