MIDlet scaling in S60 5th Edition devices
Article Metadata
S60 5th Edition introduced a new screen size of 360x640 pixels. Common screen size in other S60 devices is 240x320 pixels (QVGA). There are three JAD attributes for scaling MIDlets to fit better to this new larger screen size. Using the attributes listed in this article makes it possible to run existing MIDlets on Nokia 5800 XpressMusic screen. There might also be performance problems with MIDlets, which use the whole full screen as drawing area. Using smaller drawing area(, for example QVGA) and scaling it to Nokia 5800 XpressMusic screen might improve performance.
Four important JAD attributes used for MIDlet scaling:
- Nokia-MIDlet-Canvas-Scaling-Orientation-Switch (possible values "true" or "false")
- If true, indicates that the MIDlet can also support the given resolution in both portrait and landscape resolutions.
- Nokia-MIDlet-Original-Display-Size (for example "240,320")
- Specifies the screen for which the MIDlet was originally designed. (This should be only used in special cases - see note below.)
- Nokia-MIDlet-Target-Display-Size (for example "360,640")
- Specifies the target size for the MIDlet.
- Nokia-MIDlet-On-Screen-Keypad ("no", "gameactions" or "navigationkeys")
- Specifies the on-screen keypad for a Canvas application.
The image below shows, how Nokia-MIDlet-Original-Display-Size and Nokia-MIDlet-Target-Display-Size attributes can be used for MIDlet scaling.
The image below shows, how Nokia-MIDlet-Canvas-Scaling-Orientation-Switch attribute is used for MIDlet scaling.
Nokia-MIDlet-Original-Display-Size and Nokia-MIDlet-Target-Display-Size attributes can be used for graphics scaling for full screen LCDUI Canvases. Scaling is done by the platform and it’s not visible to MIDlet.
It's important to note that the attribute Nokia-MIDlet-Target-Display-Size should only be used in special cases, for example when application resolution needs to be limited to a certain size or aspect ratio. If the attribute is not set, the MIDlet is scaled without changing aspect ratio to the display resolution of a device where MIDlet is run. If target resolution is specified the scaling is fixed to that particular resolution so there incompatbility issue if it's run in some other display resolutions. Specifying only the Nokia-MIDlet-Original-Display-Size allows MIDlet to run correctly in different reslution devices as it is scaled to device resolution (where Canvas graphics scaling is supported generally).
The attribute Nokia-MIDlet-Canvas-Scaling-Orientation-Switch was introduced to supplement the existing functionality. This attribute allows the MIDlet to define whether application supports orientation switching on the defined original display size resolution. Without setting this attribute to true, the scaling is always done to the same orientation regardless of actual device orientation.
Note also, that "Nokia-MIDlet-App-Orientation" attribute can be used to force either portrait or landscape UI orientation. The orientation is only fixed on devices that support the specific layout. The possible values for the attribute are "portrait" and "landscape".




30 Sep
2009
As we are aware of that S60 5th Edition devices are having a new screen size of 360x640 pixels, which is larger than older S60 devices is 240x320 pixels. So some scaling should be done on existing MIDlets (or we can say on existing applications), to make them run on S60 5th Edition with better performance.
This article provides the approach to scale MIDlets in S60 5th Edition devices. There are mainly Four important JAD attributes used for MIDlet scaling. Which are : Nokia-MIDlet-Canvas-Scaling-Orientation-Switch , Nokia-MIDlet-Original-Display-Size (for example "240,320") , Nokia-MIDlet-Target-Display-Size (for example "360,640") , Nokia-MIDlet-On-Screen-Keypad.
These mentioned attributes are very well explained by the article with image-implementations. Some important information about them are also provided. This article can be useful to the developers who want to run existing applications of older S60 devices on the latest S60 5th Edition devices.
29 Sep
2009
This article has great source of information as it addresses such a new thing which is latest in the market that is newly launched S60 5th edition Devices like Nokia 5800 Express Music Phone. This series have big screen size that previous ones. So To run existing application on these edition devices new a new approach and new .jad file attributes like Nokia-MIDlet-Canvas-Scaling-Orientation-Switch,Nokia-MIDlet-Original-Display-Size,Nokia-MIDlet-Target-Display-Size are explained so nicely with specific details on each of the attributes.Which things to keep in mind while wring above three attributes and their possible values.
Many new concepts and attributes are introduced and explained well here in this article with easy to understand and implement language.