{ "id": "118223", "key": "AC-2109", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-08-09T21:36:41.000+0000", "created": "2013-08-09T21:13:50.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:05.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Problem*\r\n\r\nPressing home button of an Android device on camera overlay(which is in portrait mode) and re opening the app gives an error message in an alert box.\r\n\r\n*Test Case*\r\n1. Open the camera from a portrait mode screen\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : '#FFF'\r\n});\r\nvar label = Ti.UI.createLabel({\r\n text : \"Tap to show camera\"\r\n});\r\nwin.add(label);\r\nwin.open();\r\n \r\nvar cameraOverlayView = Ti.UI.createView({\r\n height : '100%',\r\n width : '100%'\r\n});\r\n \r\nwin.addEventListener('click', function() {\r\n var params = {\r\n success : function(e) {\r\n Ti.API.info('SUCCESS');\r\n },\r\n error : function(e) {\r\n alert('ERROR ' + JSON.stringify(e));\r\n },\r\n cancel : function(e) {\r\n Ti.API.info('CANCEL ' + e);\r\n },\r\n mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n overlay : cameraOverlayView\r\n \r\n };\r\n Ti.Media.showCamera(params);\r\n});\r\n{code}\r\n2. Press Home button of Android device.\r\n\r\n3. Re open the app.\r\n\r\n4. The camera screen disappears and the following message is seen in an alert box:\r\n\r\n1\r\n{ \"message\": \"Unable to setup preview surface:null\" ,\"code\":-1,\"error\":\"Unable to setup preview surface:null\",\"success\":false}\r\n\r\nI know this is a duplicate of TIMOB-14423, but this is marked as resolved and it's not. I still have the problem, even in 3.1.2.v20130730133101 and 3.1.2.v20130807111603, but it's fixed in 3.2.0.v20130807110843. Can you include the fix in 3.1.2?", "attachment": [], "flagged": false, "summary": "Android: Pressing home button of device on camera overlay in portrait mode and re-opening the app gives an error message", "creator": { "name": "legolas8911", "key": "legolas8911", "displayName": "Blaga Mihai", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "legolas8911", "key": "legolas8911", "displayName": "Blaga Mihai", "active": true, "timeZone": "Europe/Helsinki" }, "environment": "Titanium SDK version: 3.1.1 GA, 3.1.2.v20130730133101\r\nPlatform & version: Android 4.2.2\r\nDevice Details: Samsung Galaxy S\r\nHost Operating System: Windows 7\r\nTitanium Studio version: 3.1.1.201306112235", "comment": { "comments": [ { "id": "265789", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry Blaga, I'll have to close this. The issue is fixed either way, so there's no need for another report. Our engineering team will answer your question in TIMOB-14423. Thanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-09T21:36:41.000+0000", "updated": "2013-08-09T21:36:41.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }