Device Update Instructions
These instructions describe the procedure that developers and
administrators must follow to successfully install a device update. It includes
changes to device capabilities that might require changes to your custom
code.
What is a Device Update?
Many new devices are put on the market between releases of the
Mobile Internet Toolkit. Therefore, Microsoft developed a process to support
many of those devices. This process is called a device update.
A large number of mobile devices are currently available to
consumers, and manufacturers are continually releasing new ones. One core
architectural feature of the Mobile Internet Toolkit is the abstraction of
device capabilities. What this means is that controls do not render markup.
Controls use what is called an adapter to
render markup. Controls select an appropriate adapter based upon the
capabilities of a requesting device. A
device update typically adds new device capability sections to the global
configuration file, Machine.config.
It is extremely important to provide Mobile Internet Toolkit
customers with the capability to easily update their mobile Web application to
support new devices. The following instructions describe the contents of the
device update, including how to install it and how to preserve customizations
made to your existing installation of the Mobile Internet Toolkit, typically
made in the Machine.config.
The list of devices that Microsoft has tested with the
Mobile Internet Toolkit is found here.
The Device Update Process
This device update consists solely of a new browser capabilities
(<browserCaps>) section for the configuration file, Machine.config, which
replaces your existing <browserCaps> section to add support for a number
of additional devices. The device update does not contain additional device
adapter code. The previously released device adapter code works correctly with
the new configuration file to support the additional devices.
In general, any device that has been tested on a previous release will
also have been tested on the current release.
Installing the Device Update
During installation, the device update performs the following
tasks:
- Checks whether the
<browserCaps>
section of your existing Machine.config file has been modified.
- Saves the
<browserCaps> section of your
existing Machine.config file.
- Replaces the
<browserCaps> section
of the Machine.config file.
You can download the latest device updates from the Web
here.
To install this device update, perform the following steps:
- Install the device update by either saving the .exe file to your local
machine and then double-clicking the .exe file, or by running the device update
in place.
- Follow the subsequent on-screen instructions.
- Copy the custom changes into the
<browserCaps>
section of the Machine.config file.
Normally, the device update process displays a dialog box during
the update if it finds changes in the <browserCaps> section of the
Machine.config file. The dialog box warns you that the <browserCaps>
section, including your changes, is replaced during the update. If you choose
the quiet update option (-q), the device update process does not display
anything to you, but silently installs the device update, including replacing
the <browserCaps> section in the Machine.config file.
In either case, the device update process always saves your
existing <browserCaps> section.
Changes to Machine.config
The Mobile Internet Toolkit setup process places distinct entries
into a number of sections in the Machine.config file. Since this device update
does not contain any new adapter sets, the device update process modifies only
the <browserCaps> section of the Machine.config file.
Changes to <browserCaps>
The <browserCaps> section of the Machine.config file
contains information about each tested device. This information is
incorporated in a MobileCapabilities object when a
request is received. The device update process replaces the existing
<browserCaps> section with a new
<browserCaps> section. This new
section contains not only information about the existing set of tested
devices, but also information about the new devices.
Comments Added for Device Update Information
The device update procedure adds comments to the Mobile Internet
Toolkit entries. These comments help identify where you should make
device-specific changes.
Preserving Changes to <browserCaps>
The device update process saves the <browserCaps> section to
a backup file after you install a device update. The update procedure saves your
old <browserCaps> section, including custom changes, to
%FrameworkDir%\%FrameworkVersion%\Update\DeviceUpdateN\oldbrowsercaps.config, where
N is the device update version. Once the device
update process is complete, you can copy the custom changes into the
<browserCaps> section of the Machine.config file.
If you modified a device capability section in the Machine.config
file and you want to keep that change after the device update, you must copy
your custom device capability section into the new Machine.config file.
Other Issues
Changes to ScreenCharactersWidth Property
The initial Mobile Internet Toolkit release used full-width
Japanese characters when calculating the ScreenCharactersWidth property for
i-mode and J-Phone devices. This is not consistent with how the
ScreenCharactersWidth property is calculated for other devices, which use
half-width characters.
If you have code that performs custom actions for i-mode or
J-Phone devices using the ScreenCharactersWidth property, you will have to
change your code to allow for this change.
Modify your custom i-mode or J-Phone device code to divide the
value returned by the ScreenCharactersWidth property by 2 if you expect
ScreenCharactersWidth is in full-width Japanese characters.