Entering content frame

Procedure documentation Adding a New Mobile Device Locate the document in its SAP Library structure

Use

To make device properties for additional mobile devices available, create a new XML document with the extension .cap and save it in the appropriate directory.

The XML file for each device type is stored on the Java-enabled Web server in the sub-directory .../mobile of the root directory.

Recommendation

When you add new devices, we recommend that you temporarily copy the files describing the device properties (that is, all the files in the /mobile sub-directory) to another directory for test purposes. To do this, you must change the Deployment Descriptor parameters appropriately. (See Changing Deployment Descriptor Elements for more information).

Procedure

  1. To create a new device type, choose the template provided, template.cap, stored on the Java-enabled Web server under .../mobile. The template.cap file lists all the available device properties. They offer an overview of all available device properties, as well as providing help when you want to enter device-specific values for these properties. All available device properties are also stored in the DTD file devcap.dtd. You only need to define properties for a specific device.
  2. Note

    If you do not define properties the default values are sent to the Java application at runtime.

  3. In the XML Editor, open the XML document template.cap, which contains the device properties of a specific device type. (You can also use the widely available Microsoft Notepad).
  4. Enter the appropriate data – that is, the values you want to assign to the device properties.
  5. Save the new file with a meaningful name and the extension .cap – for example, siemensM35.cap.
  1. Then edit the configuration file devices.xml saved in the same directory in an XML Editor. You have to add another <device/> tag to this file. To do this, enter:
    1. The ID number
    2. The string contained in the HTTP header "userAgent"
    3. The priority (specifies the exactness with which the device can be identified). See Device Recognition Mechanism
    4. The MIME type passed in the HTTP header "accept" by the requesting device
    5. The name of the device

This graphic is explained in the accompanying text

<device>
<id>Y_SiemensS35</id>
<userAgent>SIE-S35/1.0 UP/</userAgent>
<priority>1</priority>
<accept>text/vnd.wap.wml</accept>
<deviceName>SiemensS35</deviceName>
</device>

Caution

The device name <deviceName/> in the devices.xml file must match the name of the associated XML file, .cap. Choose a meaningful name for the name of the device in the configuration table. The ID number must begin with an upper case Y or Z, followed by an underscore, and then by a meaningful string representing the name of the device. The ID numbers should begin with a Y or Z; otherwise they will be overwritten during updating.

Caution

When maintaining contents or names of files, fields and so on, bear in mind that Java is case-sensitive.

In any case, you must restart the Java Servlet Engine after changing the device properties.

Result

You have added a specific device to the device recognition mechanism.

Leaving content frame