">mixi Developer Center (mDC)

mixi Apps

mixi Apps (English) » Technical Specification » Mobile » How to write Gadget XML

How to write Gadget XML

As with mixi Apps for PC, Gadget XML file is also required for developing a mixi Apps Mobile. The Gadget XML file complys with OpenSocial and Gadgets specification.

The start URL for the mixi Apps Mobile is written in the Gadget XML. The start URL has to be specified with the /Content@href attribute as shown in the following sample. Without specifying the URL, the mixi Apps Mobile fails to be registered.

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="Sample mixi Application"></ModulePrefs>
  <Content type="url" view="mobile" href="http://example.com/foobar.html" />
</Module>

Description for mixi Apps both on PC and Mobile

On the mixi Platform, a mixi Apps executable both on PC and mobile can be developed. Such configuration can be written in a Gadget XML. For example, with the following code, "Hello Social World!" will be displayed for an access from PC, and the content of "http://example.com/foobar.html" is browsed for an access from a mobile phone.

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="Sample mixi Application"></ModulePrefs>
  <Content type="html">
  <![CDATA[
  <h1>Hello Social World!</h1>
  ]]>
  </Content>
  <Content type="url" view="mobile" href="http://example.com/foobar.html" />
</Module>

TOP OF THIS PAGE