I am developing an app for the Samsung Galaxy Camera 2. Unlike most android devices, this device has a hardware button to open and close the camera's flash. I would like the app to tell the user to open the flash before they take a picture, if the flash mode is on. However i can not detect if the camera's flash is opened or closed. The flash button does not register as a key event so I do not know how else to detect when this hardware button is being used.
Asked
Active
Viewed 196 times
3
-
1Does the available flash modes list that you get back from `Camera.Parameters` change based upon whether the flash is open or closed? – CommonsWare Oct 01 '15 at 18:06
-
No, the flash modes do not change.i also printed out camera.getParameters().flatten() and all the parameters were the same no matter if the flash was opened or closed. – Nathan C Oct 01 '15 at 22:02
-
Then you're probably out of luck. – CommonsWare Oct 01 '15 at 22:06
1 Answers
0
I found this in http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getFlashMode()
try getFlashMode();

Ammar Samater
- 529
- 2
- 7
- 24
-
already tried that, the flash modes are independent of the hardware button – Nathan C Oct 01 '15 at 18:58