Thursday, April 27, 2006

J2ME: Write once, run anywhere?

Write once, pray it will run in more than one family of phones... that's more like it. Just collecting another J2ME anecdote that would have been funny if it's not so exasperating.

On different handsets, VideoControl has a getSnapshot(null) method that returns images of different formats. According to documentations, getSnapshot(null) returns a PNG format. Yet this returned PNG in Nokia Series60 handsets and JPG in Sony Ericsson handsets (K300i, K500i, K700i)! It might not seem like a big thing; but this means many many more lines of codes to handle different cases.

To think this escaped our notice for many months until it started crashing our black box libraries...??? Dear God, deliver us from bad API designers!

No comments: