java-mecameramidletlight

How to turn on camera flash or torch in Java ME / J2ME?


I have created a midlet that takes photos.

Is there any way to turn on the devices flash/torch in my code? If so, is a particular API required?

(The device I'm developing for is a Sonim XP3300.)

Thanks in advance.


Solution

  • As mr_lou pointed out, JSR-234 was indeed required (in particular, the FlashControl class) but it turns out this JSR is not supported by the Sonim XP3300 as a NoClassDefError is thrown when I try to reference FlashControl in my code.