C H A P T E R 7 |
Device Definition Files |
This chapter describes how to create device definition files that you can use to import devices to the Catalog Manager. See “Importing Devices” in the Catalog Manager online help for information on how to import devices.
You can add devices into the Catalog Manager by importing device definition files in .xml format. Use the following tags to create a device definition file that you can use to import a device into the Catalog Manager. All required tags are noted.
<?xml version="1.0" encoding="utf-8"?> It is the first tag in the file. It states the XML version and the text encoding used for this file. The file must use UTF-8 encoding. |
|
This is the top-level content submission file tag and encloses the entire document. |
|
A unique identifier for a mobile device model. The user-agent is a regular expression that usually contains hardware, browser, and model information about the device. |
|
The MimeTypes section of the device definition file must begin with this top-level MimeTypes tag. Note: While you do not have to specify MimeType information, you must include the <MimeTypes/> tag in the device definition file. The following tag is valid within <MimeTypes>: <MimeType>. |
|
This tag contains the information for a specific MimeType supported by the device. More than one MimeType tag can be included per device. The following tags are valid within <MimeTypes>: <MimeName>, <MimeContentType>, <Extension>, <DeliveryType>, and <IsMMSCapable>. |
|
The file extension associated with this MimeType. Specify only one extension per MimeType. |
|
The delivery method that the device supports, either one-step or two-step download, for that MIME type. One-step download occurs when all information associated with the content is downloaded in a single step. One-step download is valid for any content type other than MIDlets. Two-step download occurs when a descriptor file is associated with the content. First the descriptor file is downloaded, then the content is downloaded. MIDlets always use two-step downloads. If you choose a two step download for content other than MIDlets, you must specify a content descriptor template when you set the capabilities of the device. See “Managing Content Descriptor Templates” in the Catalog Manager online help for more information. For SMS content, you must choose either NSM or EMS as the delivery mechanism. The following are valid values: Note that only one SMS delivery mechanism type, either NSM or EMS, is allowed per device definition file. |
|
The Capabilities section of the device definition file must begin with this top-level MimeTypes tag. The following tag is valid within <Capabilities>: <Capability>. |
|
A device capability. Each device capability is defined with a separate <Capability> tag. See <Name> for a list of possible capability definitions. You must specify a browser type. The following tags are valid within <Capability>: <Name> and <Value>. |
|
The name of the device capability. Capabilities can include the following features:
You must specify a browser type, other capabilities can be specified as needed. See Chapter 8 Device Capabilities for descriptions and valid values. |
|
The value of the capability being defined. You can use an asterisk (*) for any string or Boolean value. Using the asterisk indicates that the device supports any value. |
The following code example demonstrates tag usage:
Copyright © 2008, Sun Microsystems, Inc. All Rights Reserved.