[TIMOB-13998] Android: add setCameraFlashMode feature for custom overlays in Ti.Media
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-06T20:36:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API, Release 3.3.0 |
Components | Android |
Labels | module_media, qe-testadded |
Reporter | Mauro Parra-Miranda |
Assignee | Biju pm |
Created | 2013-05-28T00:38:49.000+0000 |
Updated | 2014-07-22T22:52:30.000+0000 |
+1 on this feature request
PR: https://github.com/appcelerator/titanium_mobile/pull/4912
Is this ready to go? Would love to start using it.
Test case
New PR : https://github.com/appcelerator/titanium_mobile/pull/5322
Will we be able to toggle flashMode from the overlay while the camera is open? Use case would be: 1. Camera preview starts 2. The user sees the scene is too dark without flash and wants to turn flash on 3. A button on the camera overlay would allow the user to set flashMode to turn flash on This use case seems to be the inspiration for the [feature request](https://developer.appcelerator.com/question/152715/flash-mode-in-camera). It may, in fact, be possible in your pull request, Biju, but I wanted to clarify. And if it is possible in your pull request, could you add toggle to your test case? Excited for flash control - thank you for your contribution to this ticket!
Test Case
Oh awesome! Our users are going to be so excited. Right now they have to take a photo with normal camera then open the app then select photo from gallery. This will save them so much time. Thank you, again.
Wait, Ti.Media.flashMode is a boolean? On the (undocumented) iOS side, we use constants. We need to make sure that it's the same for both platforms, please.
Test Case
Modify 'flashMode' to 'cameraFlashMode' for parity with iOS: https://github.com/appcelerator/titanium_mobile/pull/5567
On iOS, Titanium SDK 3.3.0.GA, setting Ti.Media.cameraFlashMode to false seems to set the camera flash to an "auto" mode; the flash still fires if you cover the light sensor with your hand. Is this expected, and if so, will there be functionality in the future to allow flash to be turned off, overriding auto flash mode?
Whoops, this ticket is for Android...can't edit/delete comments any more?
Nevermind, I see the constants in the documentation now. I was using the code snippet above which doesn't use the constants so I'm assuming that's why it's using "auto" behavior.