{ "id": "122869", "key": "TIMOB-15812", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-01-07T00:12:03.000+0000", "created": "2013-11-25T12:40:07.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-3.2.0" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2015-02-12T03:00:00.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": "Android: Media: Camera is not opening with overlay property set in Ti.Media.showCamera().\r\nIt also occur on SDK: 3.1.3.GA\r\nSteps to reproduce\r\n1. Run the below app.\r\n{code}\r\nvar _window = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n}); \r\n\tvar openCameraButton = Ti.UI.createButton({\r\n\t\ttitle : 'Open Camera'\r\n\t});\r\n\r\n\topenCameraButton.addEventListener('click', function(e) {\r\n\t\tvar cameraOverlay = Ti.UI.createView();\r\n\r\n\t\tvar takePhotoButton = Ti.UI.createButton({\r\n\t\t\tbackgroundColor : '#fff',\r\n\t\t\tbackgroundSelectedColor : '#efefef',\r\n\t\t\tborderColor : '#000',\r\n\t\t\tborderRadius : 17,\r\n\t\t\tborderWidth : 1,\r\n\t\t\tbottom : 65,\r\n\t\t\tcolor : '#000',\r\n\t\t\theight : 34,\r\n\t\t\topacity : 0.4,\r\n\t\t\ttitle : 'Take Photo',\r\n\t\t\twidth : '100dp'\r\n\t\t});\r\n\r\n\t\tvar closeCameraButton = Ti.UI.createButton({\r\n\t\t\tbackgroundColor : '#fff',\r\n\t\t\tbackgroundSelectedColor : '#efefef',\r\n\t\t\tborderColor : '#000',\r\n\t\t\tborderRadius : 17,\r\n\t\t\tborderWidth : 1,\r\n\t\t\tbottom : 65,\r\n\t\t\tcolor : '#000',\r\n\t\t\theight : 34,\r\n\t\t\topacity : 0.4,\r\n\t\t\tright : 10,\r\n\t\t\ttitle : 'Close Camera',\r\n\t\t\ttop : 10,\r\n\t\t\twidth : '150dp'\r\n\t\t});\r\n\r\n\t\ttakePhotoButton.addEventListener('click', function(e) {\r\n\t\t\tTi.Media.takePicture();\r\n\t\t});\r\n\r\n\t\tcloseCameraButton.addEventListener('click', function(e) {\r\n\t\t\talert('closing camera');\r\n\t\t\tTi.Media.hideCamera();\r\n\t\t});\r\n\r\n\t\tcameraOverlay.add(takePhotoButton);\r\n\t\tcameraOverlay.add(closeCameraButton);\r\n\r\n\t\tTi.Media.showCamera({\r\n\t\t\tsuccess : function(e) {\r\n\t\t\t\talert('success callback');\r\n\t\t\t},\r\n\t\t\tcancel : function() {\r\n\t\t\t\tTi.API.info('cancel callback');\r\n\t\t\t},\r\n\t\t\terror : function(e) {\r\n\t\t\t\tTi.API.info('error callback');\r\n\t\t\t},\r\n\t\t\tallowEditing : false,\r\n\t\t\tanimated : false,\r\n\t\t\tautohide : false,\r\n\t\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\t\toverlay : cameraOverlay,\r\n\t\t\tsaveToPhotoGallery : false,\r\n\t\t\tshowControls : false\r\n\t\t});\r\n\t});\r\n\r\n\t_window.add(openCameraButton);\r\n\r\n_window.open();\r\n\r\n{code}\r\nif overlay property is commented then the app works fine.\r\nExpected: \r\nCamera is opened.\r\n\r\nActual:\r\nCamera does not open.", "attachment": [], "flagged": false, "summary": "Android: Media: Camera is not opening with overlay property set in Ti.Media.showCamera()", "creator": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Tested on:\r\nDevice : Google Nexus 7, Android Version: 4.2.1\r\nSDK: 3.2.0.v20131122172908\r\nCLI version : 3.2.0-alpha\r\nOS : MAC OSX 10.9\r\n1.3.0-alpha6\r\nAppcelerator Studio, build: 3.2.0.201311221207\r\nXCode : 5.0.2", "comment": { "comments": [ { "id": "281847", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Is this specific to device or Android version? It is working in my Galaxy Nexus running Android 4.3\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-12-01T16:53:15.000+0000", "updated": "2013-12-01T16:53:15.000+0000" }, { "id": "281871", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "The issue cannot reproduce with the release master 3.2.0\nTested with: \nTitanium Studio, build: 2.1.2.201208301612\nTitanium SDK version: 3.2.0\nTested on\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-12-02T11:45:09.000+0000", "updated": "2013-12-02T11:45:09.000+0000" }, { "id": "288999", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Issue still reproducible on following environment:\n\nAppcelerator Studio, build: 3.2.1.201401151647\nSDK build: 3.2.1.v20140117222448\nacs@1.0.11\nalloy@1.3.1-beta2\nnpm@1.3.2\ntitanium@3.2.1\ntitanium-code-processor@1.1.0\nMac9(Maverick)\nDevices: Nexus 7(4.3)\n\nCamera is not opening with overlay property while this is working fine on iOS.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-21T09:47:33.000+0000", "updated": "2014-01-21T09:47:33.000+0000" }, { "id": "337948", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Issue was for devices like Nexus 7 (2012), code was trying to use rear facing camera which doesn't exists when overlay is being used.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/6536\r\n\r\n{code}\r\nvar _window = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n}); \r\n\tvar openCameraButton = Ti.UI.createButton({\r\n\t\ttitle : 'Open Camera'\r\n\t});\r\n\r\n\topenCameraButton.addEventListener('click', function(e) {\r\n\t\tvar cameraOverlay = Ti.UI.createView();\r\n\r\n\t\tvar takePhotoButton = Ti.UI.createButton({\r\n\t\t\tbackgroundColor : '#fff',\r\n\t\t\tbackgroundSelectedColor : '#efefef',\r\n\t\t\tborderColor : '#000',\r\n\t\t\tborderRadius : 17,\r\n\t\t\tborderWidth : 1,\r\n\t\t\tbottom : 65,\r\n\t\t\tcolor : '#000',\r\n\t\t\theight : 34,\r\n\t\t\topacity : 0.4,\r\n\t\t\ttitle : 'Take Photo',\r\n\t\t\twidth : '100dp'\r\n\t\t});\r\n\r\n\t\tvar closeCameraButton = Ti.UI.createButton({\r\n\t\t\tbackgroundColor : '#fff',\r\n\t\t\tbackgroundSelectedColor : '#efefef',\r\n\t\t\tborderColor : '#000',\r\n\t\t\tborderRadius : 17,\r\n\t\t\tborderWidth : 1,\r\n\t\t\tbottom : 65,\r\n\t\t\tcolor : '#000',\r\n\t\t\theight : 34,\r\n\t\t\topacity : 0.4,\r\n\t\t\tright : 10,\r\n\t\t\ttitle : 'Close Camera',\r\n\t\t\ttop : 10,\r\n\t\t\twidth : '150dp'\r\n\t\t});\r\n\r\n\t\ttakePhotoButton.addEventListener('click', function(e) {\r\n\t\t\tTi.Media.takePicture();\r\n\t\t});\r\n\r\n\t\tcloseCameraButton.addEventListener('click', function(e) {\r\n\t\t\talert('closing camera');\r\n\t\t\tTi.Media.hideCamera();\r\n\t\t});\r\n\r\n\t\tcameraOverlay.add(takePhotoButton);\r\n\t\tcameraOverlay.add(closeCameraButton);\r\n\r\n\t\tTi.Media.showCamera({\r\n\t\t\tsuccess : function(e) {\r\n\t\t\t\talert('success callback');\r\n\t\t\t},\r\n\t\t\tcancel : function() {\r\n\t\t\t\tTi.API.info('cancel callback');\r\n\t\t\t},\r\n\t\t\terror : function(e) {\r\n\t\t\t\tTi.API.info('error callback');\r\n\t\t\t},\r\n\t\t\tallowEditing : false,\r\n\t\t\tanimated : false,\r\n\t\t\tautohide : false,\r\n\t\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\t\toverlay : cameraOverlay,\r\n\t\t\tsaveToPhotoGallery : false,\r\n\t\t\tshowControls : false\r\n\t\t});\r\n\t});\r\n\r\n\t_window.add(openCameraButton);\r\n\r\n_window.open();\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-01-06T04:06:59.000+0000", "updated": "2015-01-06T04:06:59.000+0000" }, { "id": "343021", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.2\r\nAppcelerator Studio, build: 4.0.0.201502051633\r\nTitanium SDK build: 4.0.0.v20150211081857\r\nTitanium CLI, build: 3.6.0-dev\r\nAlloy: 1.5.1\r\nAndroid build tools 21.1.1\r\nNexus 7 (4.3)\r\n\r\nBuilt to device, the camera now opens and uses the front camera.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-02-12T02:59:12.000+0000", "updated": "2015-02-12T02:59:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }