I use setFlashMode()
in CameraFragment
to set flash modes. However, flash works only when using autofocus, but now when calling takePicture()
method. Can anyone shed some light on this? Thank you.
Asked
Active
Viewed 402 times
2

CommonsWare
- 986,068
- 189
- 2,389
- 2,491

Sinisa
- 240
- 3
- 14
-
Other than passing the flash modes along to the `Camera`, I am not really doing anything with them directly. – CommonsWare Apr 26 '14 at 19:44
-
Yes i checked that already, but i thought i was missing something. Any ideas? – Sinisa Apr 26 '14 at 20:29
-
File an issue on the repo, providing the exact details of your device(s) (`Build.MANUFACTURER` and `Build.PRODUCT`) and what you're passing to `setFlashMode()` and when. I'll see if I can reproduce your scenario. It is entirely possible that I'll need to add more device-specific flash smarts, on top of everything else. – CommonsWare Apr 26 '14 at 20:48
-
I will do that, on another note, flash doesn't work on your demo app either. Just now i compiled and ran it with no alterations at all. – Sinisa Apr 26 '14 at 20:59
-
The demo app requests particular flash modes that may or may not be supported by the device. Beyond that, again, I need to know the specific device(s) to be able to investigate further. – CommonsWare Apr 26 '14 at 21:06
-
1Nexus 4. Thanks anyway, ill post an issue. – Sinisa Apr 26 '14 at 21:28
-
Demo flash doesn't appear to be working on a Verizon Droid with 4.1. Build.Manufacturer: 'motorola', Product: 'XT912_verizon' my other test device doesn't have a flash. – Stan Smith Jul 23 '14 at 20:02
1 Answers
0
I had a similar problem with my phone Galaxy S4 (SPH-L720).
I was able to resolve it by copying the existing Galaxy S4 xml config file and creating a new file specific for my phone: cwac_camera_profile_samsung_jfltespr.xml
As mentioned in the comments, you need to include in the filename the Build.MANUFACTURER (samsung
in this case) and jfltespr
is the Build.PRODUCT code.
<!-- Galaxy S4 (SPH-L720) -->
<deviceProfile>
<maxPictureHeight>
2448
</maxPictureHeight>
<recordingHint>
STILL_ONLY
</recordingHint>
</deviceProfile>

swbandit
- 1,986
- 1
- 26
- 37