Creating applications for multiple devices can produce design challenges that need to be considered at the design phase. The variations between mobile devices mean that checking the implementation details of each device and testing the application on all target devices is mandatory. The following is a list of the main issues in designing for multiple devices:
Differences between devices
Different devices run on different developer platforms that include different APIs. Even devices that have the same APIs may have different implementations, including whether all optional packages are implemented or whether a different version of the API is used. For more information on the different platforms, see Forum Nokia, Platforms. See also Forum Nokia, Porting. For the release information of the APIs supported in S60 and Nokia Series 40 platforms, see MIDP 2.1 and optional packages.
In addition to the different developer platforms, devices also tend to have a variety of different screen size, memory and other qualities.
Differences between API implementations
Even if the devices run on the same developer platform and the same APIs, there may be differences in the implementation of individual mobile device models that may cause problems. For information on Nokia devices, see Forum Nokia, Devices. For information on all S60 devices, see Device Specifications on the S60 platform Web site.
Differences between screen sizes
Mobile devices tend come in a variety of screen resolutions. This means that an application is more likely to work on devices that have a matching screen resolution to the original target device.
The MIDP 2.1 specification provides several properties and methods that can be used for querying different aspects of an API implementation. The proper use of these can make porting MIDlets much easier.
There are two levels of user interface components available in the LCDUI package: high-level APIs and low-level APIs. When high-level APIs and components are used, the MIDlet has a greater portability because logical components are being used, that is, the MIDlet only guides the device on laying out the components. However, even on this level, portability cannot be guaranteed. For example, the aspects of the component layout which are not mandatory cannot be relied to be portable.
With low-level APIs, the MIDlet draws directly on the screen using lower-level primitives. One important issue concerning these low-level APIs is hard-coding positional information in order to achieve a required layout for a device. This can easily lead to problems as the result can look quite different on other devices. To prevent these type of problems, MIDlets can obtain several variables, such as the canvas or font size, from the device to avoid layout problems. For example, it is a common fault to assume a certain font height and then start the following line of text from a fixed distance below the first line, which may look awkward on some devices.
With S60 and Series 40 devices, five key issues affect the amount of work needed to port MIDlets from one device to another:
Display
The difference in size between Series 40 and S60 device displays is considerable: from 128 x 128 pixels for Series 40 devices to up to 416 x 352 pixels for S60 devices. It may be possible to use the same graphics for both platforms, but optimizing the graphics for each screen size requires redrawing the images from scratch. This allows taking full advantage of the display.
Processing power
Current S60 devices have significantly more processing power than current Series 40 devices. This means that a MIDlet using standard MIDP will run, without modifications, on S60 devices as well as or better than on Series 40 devices. However, taking full advantage of the device requires modifications to the code. This might include, for example, adding more visual background layers for the S60 version.
Keep also in mind that although S60 devices have greater processing power, using expensive operations can negate the advantage. For example, including unnecessary screen drawings where larger screen sizes can quickly absorb most of the processing power. Therefore, great care is needed when optimizing application performance.
Amount of heap memory
Series 40 devices have a limited amount of heap memory, whereas S60 devices have a scalable heap. Because of this, a MIDlet developed for the Series 40 Platform can be ported without modification to the S60 Platform.
JAR file size limitation
Series 40 devices using MIDP 2.0 have a JAR file size limitation from 128KB to up to 1MB depending on the device, whereas for the S60 Platform, the JAR file size is limited by the mobile device's total application memory space. Since the application memory space is usually measured in megabytes, it should not become an issue. In theory, a MIDlet developed for the Series 40 Platform can therefore be ported without modifications to the S60 Platform.
Note: There might also be device-specific maximum download sizes, which define the maximum size of content allowed to be downloaded to the device. In many products the maximum download size (for any content) is smaller than the maximum allowed application size. This means that it may be possible to install applications via PC suite, for example, where they could not be downloaded over the air.
Keypad
The location of softkey labels on the display can change between mobile
devices or even within the same device when switching between device configurations.
As long as the application uses only high-level Command
APIs,
the softkeys are correctly accessible regardless of the device configuration.
Current MIDP 2.1 devices support multiple simultaneous key presses. MIDlets designed with a single key press in mind usually work without modification in MIDP 2.1 devices. However, to take full advantage of the devices, support for multiple key presses should be added. Adding support for multiple key presses into a ready-made game might be a tedious task. Therefore, designing the application from the start to support multiple key presses saves time. If using multiple key presses is essential, the MIDlet may have to alert the user that multiple key presses are not possible when running on devices without this support.