Okay, here we go again. Test phones are:
- Nokia 3110 Classic
- Nokia 5200
- Nokia 6500 Classic
Common for the phones are, that Runtime.totalMemory is 2.048 kb. Another common thing for them are that they're all capable of taking 480x640 pixel snapshots:
Code:
byte[] capturedImageBytes = videoControl.getSnapshot("encoding=jpeg&width=480&height=640");
Unfortunately you can't decode this byte-array on the handset:
Code:
Image capturedImage = Image.createImage(capturedImageBytes, 0, capturedImageBytes.length);
... gives a java.lang.OutOfMemoryError. On the positive side, they can all handle the decoding of 240x320 snapshots.
So ... is there some way of requesting a larger heap in the .jad file - or perhaps at runtime?