I require my application to take 3 pictures via Nokia 5800 phone during night-time. I want to ensure that the camera's flash remains ON while taking pictures. How can I ensure it?
Asked
Active
Viewed 1,500 times
0
-
Ask the question clearly. Which domain you are using? or add the tag properly. – bharath Oct 29 '11 at 11:46
-
May i know what is not clear exactly? What you mean by domain? My core requirement is to turn ON the camera's flash while taking pictures an ensure it to be turned ON. – Muhammad Maqsoodur Rehman Oct 29 '11 at 12:36
-
1Nokia supports Java ME, Symbian c++ and qt. So without domain how to help? – bharath Oct 29 '11 at 12:44
-
Either it has to be Java ME or C++. Now i know what you mean by domain... :). Thanks – Muhammad Maqsoodur Rehman Oct 29 '11 at 12:48
-
Here i mentioned domain means platform. – bharath Oct 29 '11 at 12:50
2 Answers
3
You can use the AMMS(JSR-234) API's FlashControl. Here is a piece of code example that shows its use.
FlashControl flash = (FlashControl)
player.getControl("javax.microedition.media.control.camera.FlashControl");
if(flash!=null) {
flash.setMode(FlashControl.FORCE_WITH_REDEYEREDUCE);
}

Gorkem Ercan
- 3,220
- 1
- 18
- 26
-
Cheers! My client's intended platform is S90 and not S60. The piece of code you have provided is indeed very useful for my requirement. Wonder if the same thing will work on S90? – Muhammad Maqsoodur Rehman Nov 02 '11 at 13:52
1
You need to use APIBridge.jar , this jar will allow you to call native camera application. So you can call Native Camera, application from your code. Native camera Application has default setting for Flash.
Search on google for APIBridge.jar , you will find it will example. You may also find other useful example for reading inbox, contact list etc.

Lucifer
- 29,392
- 25
- 90
- 143
-
Hi Kalpen! Why should i specifically go for APIBridge.jar? Why do you think that i need to use this library and why would javax.microedition.media.control.camera.FlashControl won't be enough for my requirement. Thanks – Muhammad Maqsoodur Rehman Nov 04 '11 at 14:10
-
1Hi Maxood, In one of my project, I used that APIBridge.jar when I was not able to use FlashControl from J2ME Code for Nokia E72 Mobile. I guess Nokia is not allowing developer to use Flash Using J2ME Code. This is the reason I asked you to go for APIBridge.jar . If you are developing for other than Nokia Mobile then you may you FlashControl from J2ME code. – Lucifer Nov 05 '11 at 03:36