{ "id": "114994", "key": "TIMOB-13998", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15931", "description": "2014 Sprint 05", "name": "2014 Sprint 05", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15932", "description": "2014 Sprint 05 API", "name": "2014 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-06T20:36:06.000+0000", "created": "2013-05-28T00:38:49.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_media", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "29085", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "114993", "key": "TIMOB-13997", "fields": { "summary": "iOS: add setCameraFlashMode feature for custom overlays in Ti.Media ", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "33999", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "124179", "key": "TIDOC-1427", "fields": { "summary": "Add documentation for Ti.Media.setCameraFlashMode()", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-07-22T22:52:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Problem Description\r\nWhen users sets a custom overlay in the camera, there is no way to set the flash on or off.\r\n\r\nh4. More info\r\nhttps://developer.appcelerator.com/question/152715/flash-mode-in-camera", "attachment": [], "flagged": false, "summary": "Android: add setCameraFlashMode feature for custom overlays in Ti.Media ", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [ { "id": "265526", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 on this feature request", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-08T05:35:34.000+0000", "updated": "2013-08-08T05:35:34.000+0000" }, { "id": "278138", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4912", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-05T10:56:24.000+0000", "updated": "2013-11-05T10:56:24.000+0000" }, { "id": "289273", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is this ready to go? Would love to start using it.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-22T19:39:29.000+0000", "updated": "2014-01-22T19:39:29.000+0000" }, { "id": "291316", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Test case\r\n{code}\r\nvar overlay = Ti.UI.createView();\r\nvar button = Titanium.UI.createButton({\r\n color : '#fff',\r\n bottom : 10,\r\n width : 301,\r\n height : 57,\r\n font : {\r\n fontSize : 20,\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n title : 'Take Picture'\r\n});\r\n \r\nbutton.addEventListener('click', function() {\r\n Ti.Media.takePicture();\r\n});\r\n \r\noverlay.add(button);\r\n \r\nTitanium.Media.showCamera({\r\n \r\n overlay : overlay,\r\n flashMode : true ,\r\n mediaTypes : Ti.Media.MEDIA_TYPE_PHOTO,\r\n saveToPhotoGallery : true\r\n}); \r\n{code}", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-05T05:52:08.000+0000", "updated": "2014-02-05T05:52:35.000+0000" }, { "id": "291330", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "New PR :\nhttps://github.com/appcelerator/titanium_mobile/pull/5322", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-05T09:21:27.000+0000", "updated": "2014-02-05T09:21:27.000+0000" }, { "id": "291446", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Will we be able to toggle flashMode from the overlay while the camera is open? Use case would be:\r\n\r\n1. Camera preview starts\r\n2. The user sees the scene is too dark without flash and wants to turn flash on\r\n3. A button on the camera overlay would allow the user to set flashMode to turn flash on\r\n\r\nThis 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?\r\n\r\nExcited for flash control - thank you for your contribution to this ticket!", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T18:31:20.000+0000", "updated": "2014-02-05T18:31:20.000+0000" }, { "id": "291616", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Test Case\r\n{code}\r\nvar overlay = Ti.UI.createView();\r\n\r\nvar button = Titanium.UI.createButton({\r\n color : '#fff',\r\n bottom : 10,\r\n width : 200,\r\n height : 57,\r\n font : {\r\n fontSize : 20,\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n title : 'Take Picture'\r\n});\r\n\r\nvar buttonChange = Titanium.UI.createButton({\r\n color : '#fff',\r\n bottom : 90,\r\n width : 200,\r\n height : 57,\r\n font : {\r\n fontSize : 20,\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n title : 'change flashmode'\r\n});\r\n \r\n var label = Ti.UI.createLabel({\r\n color:'blue',\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n text : \"FlashMode OFF\" ,\r\n top: 30,\r\n width: 200, height: 100\r\n}); \r\nbuttonChange.addEventListener('click', function() {\r\n \tTi.Media.flashMode = !Ti.Media.getFlashMode() ;\r\n \tif(Ti.Media.flashMode)\r\n \t{\r\n \tlabel.text = \"FlashMode ON\" ;\r\n \t}\r\n \telse\r\n \t{\r\n \tlabel.text = \"FlashMode OFF\" ;\r\n \t}\r\n });\r\n button.addEventListener('click', function() {\r\n Ti.Media.takePicture();\r\n});\r\n \r\noverlay.add(button);\r\noverlay.add(label);\r\noverlay.add(buttonChange);\r\n \t Titanium.Media.showCamera({\r\n overlay : overlay , \r\n flashMode : false \r\n}); \r\n{code}", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-06T09:34:31.000+0000", "updated": "2014-02-06T09:35:30.000+0000" }, { "id": "291617", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-06T09:41:02.000+0000", "updated": "2014-02-06T09:41:02.000+0000" }, { "id": "291624", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "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.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2014-02-06T12:24:36.000+0000", "updated": "2014-02-06T12:24:36.000+0000" }, { "id": "291890", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Test Case\r\n{code}\r\nvar overlay = Ti.UI.createView();\r\n \r\nvar button = Titanium.UI.createButton({\r\n color : '#fff',\r\n bottom : 10,\r\n width : 200,\r\n height : 57,\r\n font : {\r\n fontSize : 20,\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n title : 'Take Picture'\r\n});\r\n \r\nvar buttonChange = Titanium.UI.createButton({\r\n color : '#fff',\r\n bottom : 90,\r\n width : 200,\r\n height : 57,\r\n font : {\r\n fontSize : 20,\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n title : 'change flashmode'\r\n});\r\n \r\n var label = Ti.UI.createLabel({\r\n color:'blue',\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n text : \"FlashMode OFF\" ,\r\n top: 30,\r\n width: 200, height: 100\r\n}); \r\nbuttonChange.addEventListener('click', function() {\r\n Ti.Media.cameraFlashMode = !Ti.Media.getCameraFlashMode() ;\r\n if(Ti.Media.cameraFlashMode)\r\n {\r\n label.text = \"FlashMode ON\" ;\r\n }\r\n else\r\n {\r\n label.text = \"FlashMode OFF\" ;\r\n }\r\n });\r\n button.addEventListener('click', function() {\r\n Ti.Media.takePicture();\r\n});\r\n \r\noverlay.add(button);\r\noverlay.add(label);\r\noverlay.add(buttonChange);\r\n Titanium.Media.showCamera({\r\n overlay : overlay , \r\n flashMode : false \r\n}); \r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-07T09:46:11.000+0000", "updated": "2014-04-01T22:53:57.000+0000" }, { "id": "299551", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Modify 'flashMode' to 'cameraFlashMode' for parity with iOS: https://github.com/appcelerator/titanium_mobile/pull/5567", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-01T20:29:38.000+0000", "updated": "2014-04-01T20:29:38.000+0000" }, { "id": "315357", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.\r\n\r\nIs this expected, and if so, will there be functionality in the future to allow flash to be turned off, overriding auto flash mode?", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T21:47:26.000+0000", "updated": "2014-07-22T21:47:26.000+0000" }, { "id": "315370", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Whoops, this ticket is for Android...can't edit/delete comments any more?", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T22:48:39.000+0000", "updated": "2014-07-22T22:48:39.000+0000" }, { "id": "315373", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T22:52:30.000+0000", "updated": "2014-07-22T22:52:30.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }