Tuesday, June 13, 2006

J2ME Bug: mapped SoftKey values

Description: In some Motorola handsets, J2ME application running Canvas does not seem to respond when the left, middle or right soft key is pressed.

Affects: Motorola V3, V3x, SLVR L6 (only tested on these)

Workaround: In your code, expect the values of left, middle, and right soft key press to be -21, -23, -22, instead of the original 21, 23, 22.

In J2ME Polish, change the affected devices specification in devices.xml to have these extra capability parameters as described here.

1 comment:

Anonymous said...

Hi everybody!

There's another solution to this bug on some Motorola Handsets:

In the keyPressed(int keyCode) method, you define the action to the keys by using this:

switch(getGameAction(keyCode))
{ case UP:
case DOWN:
case FIRE:
.
.
.
}

I hope I could help you with this tip

Bye