{ "id": "124657", "key": "TIMOB-16166", "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": "15821", "description": "2014 Sprint 02", "name": "2014 Sprint 02", "archived": true, "released": true, "releaseDate": "2014-01-31" }, { "id": "15823", "description": "2014 Sprint 02 API", "name": "2014 Sprint 02 API", "archived": true, "released": true, "releaseDate": "2014-01-31" }, { "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-01-30T21:18:45.000+0000", "created": "2014-01-10T19:14:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_media", "parity", "qe-3.2.1", "qe-closed-3.3.0", "qe-testadded" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-07-31T07:49:51.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": "*Details:* If you create a custom camera overlay with properties, then a RuntimeException is thrown on Android.\r\n\r\n*This is not a regression and this bug is not reproducible on iOS.*\r\n\r\n*Steps to reproduce:*\r\n1. Create the default Titanium classic app with this sample code:\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n\tlayout:'vertical'\r\n});\r\n\r\nvar cameraOverlayBtn = Ti.UI.createButton({\r\n\ttitle:'camera overaly'\r\n});\r\n\r\ncameraOverlayBtn.addEventListener('click', function(e){\r\n\t\r\n\tTi.API.info('### camera overlay');\r\n\t\r\n\tvar customOverlay = Ti.UI.createView({\r\n\t\t// commenting the property will NOT throw a RuntimeException\r\n\t\tborderColor:'red'\r\n\t});\r\n\t\r\n\tvar takePhotoButton = Ti.UI.createButton({\r\n\t\ttitle:'Take Photo',\r\n\t\tbackgroundColor : '#fff',\r\n backgroundSelectedColor : '#efefef',\r\n borderColor : '#000',\r\n borderRadius : 17,\r\n borderWidth : 1,\r\n bottom : 65,\r\n color : '#000',\r\n height : 34,\r\n opacity : 0.4,\r\n width : '100dp'\r\n });\r\n \r\n takePhotoButton.addEventListener('click', function(e) {\r\n Ti.Media.takePicture();\r\n });\r\n\t\r\n\tcustomOverlay.add(takePhotoButton);\r\n\t\r\n\tTitanium.Media.showCamera({\r\n\t\tsuccess:function(success_event) {\r\n\t\t\tTi.API.info('### camera overlay success');\r\n\t\t},\r\n\t\t\r\n\t\tcancel:function(cancel_event) {\r\n\t\t\tTi.API.info('### camera overlay cancel');\r\n\t\t},\r\n\t\t\r\n\t\terror:function(error_event) {\r\n\t\t\tTi.API.info('### camera overlay error');\r\n\t\t},\r\n\t\t\r\n\t\toverlay:customOverlay,\r\n\t\t\r\n\t\t// only used to verify on iOS\r\n\t\t// showControls: false\r\n\t});\r\n});\r\n\r\nwindow.add(cameraOverlayBtn);\r\nwindow.open();\r\n{code}\r\n\r\n2. Install the app to an Android device\r\n3. Press on *camera overlay* button\r\n\r\n*Actual:* A RuntimeException is thrown (see logcat.txt attachment).\r\n*Expected:* A RuntimeException should not be thrown and the specified overlay properties should appear on top of the camera ui.", "attachment": [ { "id": "45032", "filename": "logcat.txt", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-10T19:14:42.000+0000", "size": 5298, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Camera Overlay - RuntimeException is thrown when creating custom camera overlay with properties", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 3.1.3.201309132456, 3.2.1.201401081616\r\nSDK build: 3.1.3.GA, 3.2.0.GA, 3.2.1.v20140109163246 \r\nCLI: 3.1.2, 3.2.1-beta\r\nAlloy: 1.2.0, 1.3.1-beta2\r\nDevice: Droid3 (2.3.4), Samsung Galaxy S4 (4.2.2)", "comment": { "comments": [ { "id": "287973", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~ngupta] Will do.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-13T17:45:15.000+0000", "updated": "2014-01-13T17:45:27.000+0000" }, { "id": "287983", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This issue is still reproducible with 3.1.3 release i.e. got the same RuntimeException in logcat.\n\nTested on:\n\nAppcelerator Studio, build: 3.1.3.201309132456\nSDK build: 3.1.3.GA\nCLI: 3.1.2\nAlloy: 1.2.0\nDevices: Droid3 (2.3.4), Samsung Galaxy S4 (4.2.2)\n", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-13T18:13:40.000+0000", "updated": "2014-01-13T18:13:40.000+0000" }, { "id": "290431", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Remove view from the parent if it is already attached\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5292", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-30T17:15:05.000+0000", "updated": "2014-01-30T17:15:05.000+0000" }, { "id": "302492", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified as fixed, hence closing the issue\r\n\r\nVerified on:\r\nDevice : Google Nexus 4, Android Version: 4.1.1\r\nSDK: 3.3.0.v20140423155715\r\nCLI version : 3.3.0-dev\r\nOS : MAC OSX 10.9.2\r\nAlloy: 1.4.0-dev\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nAppcelerator Studio, build: 3.3.0.201404211130\r\ntitanium-code-processor: 1.1.1-alpha\r\nXCode : 5.1.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-25T07:16:06.000+0000", "updated": "2014-04-25T07:16:06.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }