Windows Mobile Widget Manifest File
4/8/2010
The Windows Mobile Widget manifest is an XML file that contains metadata about the widget. Each Windows Mobile widget package must include a manifest.
Note
The widget manifest file must be named “config.xml”.
Sample Manifest
This example illustrates the data and structure of a valid widget manifest.
<?xml version="1.0" encoding="utf-8" ?>
<widget xmlns="https://www.w3.org/ns/widgets"
id="https://www.microsoft.com/windowsmobile.sample"
version="1.0">
<name>Weather</name>
<description>Windows Mobile widget sample.</description>
<author href="https://www.microsoft.com"
email="widgets@microsoft.com"
img="author_logo.png" />Microsoft
</author>
<license>license information</license>
<content src="widget_main.html" type="text/html"/>
<icon src="logo.png">
</widget>
Manifest Elements
xml Declaration
Required. The XML declaration defines the XML version and the character encoding used in the document.
Attribute | Description |
---|---|
version |
Required. The expected value is 1.0. |
encoding |
Required. The expected value is UTF-8. |
widget Element
Required. This is the root element of the document. Its child elements define the properties of the widget.
Attribute | Description |
---|---|
xmlns |
Required. This value must be the W3C widgets namespace: https://www.w3.org/ns/widgets. |
id |
Optional. A string that uniquely identifies each widget. If this attribute is used, its value must be a URL. For example, https://example.com/widgets/widget_name. |
mode |
Optional. A string describing the widget’s role on the system. The value can be "window", "fullscreen", or "default". If the attribute is not provided, the value is assumed to be "default". This attribute is not used in the current release. |
version |
Optional. A string specifying the widget’s version. The W3C widget specification does not enforce a format for the version string, but to take advantage of the upgrade experience for Windows Mobile Widgets, this value should use the format, major.minor.revision.build where each of the values must contain between 1 and 4 digits with the values of 0 through 9. For example, "2.11.0.1234". |
name Element
Optional. The contents of this element is a user-friendly name for the widget. This value is displayed to the user during the install and remove experience. If this element is not provided, the filename of the widget package, without the .widget extension, is used as the widget name.
description Element
Optional. A brief description of the widget. This value is not used in the current release.
author Element
Optional. This element provides information about the author of the widget. This information can be accessed from scripts through the Windows Mobile Widget object model from within the widget.
Attribute | Description |
---|---|
href |
Optional. A URL to a site specified by the author. |
Optional. The author’s email address. |
|
img |
Optional. An image associated with the widget author. |
access Element
Optional. Determines whether the widget has access to the device’s network connection.
Attribute | Description |
---|---|
network |
Required. A boolean value specifying the widget’s access to the network. If this value is true, the widget has network access. |
license Element
Optional. License information for the widget. The current release does not use this value.
icon Element
Optional. Specifies the file and dimensions of the widget’s icon. A widget manifest file may contain any number of icon elements.
Attribute | Description |
---|---|
src |
Required. The path to the graphic file. The current release supports the PNG, GIF, and ICO file formats. |
height |
Optional. An integer specifying the height of the icon, in pixels. |
width |
Optional. An integer specifying the width of the icon, in pixels. |
Icon files may be any size and will be scaled according to the context in which they are displayed. The following table lists the icon sizes used by Windows Mobile. Providing icons with these dimensions will provide the best visual quality.
DPI | Small Icons | Large Icons |
---|---|---|
131 DPI |
16x16 |
32x32 |
192 DPI |
22x22 |
44x44 |
262 DPI |
32x32 |
64x64 |