Saturday, 19 January 2008

mobile software

mobile software

When creating mobile Java software we are trying to create as less versions of application/game as possible. There we will try to describe the main rules:

1. Screen sizes.

2. Soft keys.

3. Png images.

4. Java VM bugs on specific phones.

5. Java CLCD and MIDP versions.

6. Icon images.


1.Screen sizes.
Handsets differs in the screen sizes from 96x60 by popular 128x128 128x160, 176x208, 240x320, 320x240 even to 800x352 ( surely more than 20 different screen sizes on one country market). The problem is that it's hard to create compromise between such different sizes. Some create 20 different (or more depending on the other parameters too) application versions, but we think that it's hard to maintain many versions of an application and also very confusing to deploy it. So idea is to show data in different formatting on different phones. We can point few different approaches:
  • Show only part of the data on one screen and show the rest on second screen.
  • Create scroll possibility in the application. Modern mobile web browsers are good example. They let us to scroll up and down and also left and right, but we can observe that scrolling right/left is rather inconvenient for the user. It's just like you would like to read some article on the newspaper where part of the line is on first page and the rest is on the second. So scrolling up and down is natural for the user. Off course it's not always possible on small screen sizes to use only vertical scrolling.

2.Soft keys.
Special key placed under or beside your mobile screen are called soft keys. Off course every company manufacturing phones has it's own codes for them.
There are some sites describing part of this problem:
http://www.j2meforums.com/wiki/index.php/Canvas_Keycodes
http://osdir.com/ml/java.sun.kvm/2004-10/msg00124.html
If we want to create as much as possible universal function to handle key pressed we should check some devices looking for Microedition.platform or checking if particular class exists, because producers attach their native Java libraries to the original J2ME implementation. Creating such universal function is possible but it should be tested on every handled phone model.


3.Png images.
The only image format supported on propably all MIDP Java mobile phones is PNG. It's quite easy to format any jpg, bitmap or gif image to the png format - we can just use paint on Windows or gimp on Linux.
We've discovered that on phones like SAMSUNG SGH-Z400 there is problem with painting 24 bit per pixel png images if they are not full placed on the screen (if part of image is behind the screen on the left side).
It seems that only way to fix it is to always use 8 bit per pixel images.
Some formats of PNG are also not always properly handled by all the handsets. For example some transaprent pictures created with GIMP are not opened on Motorola phones.

6.Icon images.
Every J2ME midlet can have it's own icon image - it's path is defined in /META-INF/Manifest.MF file. Icon image isn't most important in the application, but sometimes it can cause application more attractive (for example when talking about advertise applications). There is no standard for icon size. There is no possibility to create universal icon looking good on every phone model. Some of them accept 16x16 pixels icons and other more than 50x50.

1 comment:

Unknown said...
This comment has been removed by the author.