{ "id": "91148", "key": "AC-3148", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-05-11T15:41:21.000+0000", "created": "2012-05-01T13:25:03.000+0000", "labels": [ "android", "camera", "crash" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:13.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": "h2. Problem\r\n\r\nWhen running the \"Camera Basic\" test in KitchenSink for Android (2.2 APIs), the camera always crashes with either of these error messages:\r\n\r\n- \"The camera stopped unexpectedly\". \r\n- Activity Camera (in application camera) is not responding\r\n\r\nThe camera should work without crashing. \r\n\r\n\r\nh2. Test case\r\n\r\nCompile KitchenSink with Titanium 1.6.2, Android APIs 2.2. \r\nRun the \"Camera Basic\" test\r\nThe app will crash\r\n\r\nh2. Discussions\r\n\r\nhttp://developer.appcelerator.com/question/134453/the-application-camera-has-stopped-unexpectedy---android-22\r\n\r\nhttp://developer.appcelerator.com/question/55301/bug-android-apis-22-crashes-when-using-the-camera\r\n\r\n", "attachment": [], "flagged": false, "summary": "Camera always crashes Kitchen Sink on Android 2.2 ", "creator": { "name": "tsf2004", "key": "tsf2004", "displayName": "Mal Broadbent", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tsf2004", "key": "tsf2004", "displayName": "Mal Broadbent", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android SDK: APIs 2.2\r\nDevice: Android Emulator\r\nTitanium SDK: 1.62 \r\nOSX 10.6.8", "comment": { "comments": [ { "id": "193523", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nare you using the latest Kitchen Sink? It's designed for SDK version 1.8x and 2.0x.\r\n\r\nBest,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-05-02T18:13:44.000+0000", "updated": "2012-05-02T18:13:44.000+0000" }, { "id": "193546", "author": { "name": "tsf2004", "key": "tsf2004", "displayName": "Mal Broadbent", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Mauro\r\n\r\nThanks for response. This is still a problem with SDK 1.81.\r\n\r\nI am using the latest Kitchen sink (downloaded from Github 1 May 2012).\r\n\r\nWhen using Android Emulator with APIs 2.2, the camera test fails with SDK 1.81. I have just tried it now with 1.81 and get the error message \"Unexpected error:0\" when running the \"Camera Basic\" test. \r\n\r\nThanks\r\nMal\r\n\r\n", "updateAuthor": { "name": "tsf2004", "key": "tsf2004", "displayName": "Mal Broadbent", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-03T00:41:04.000+0000", "updated": "2012-05-03T00:41:04.000+0000" }, { "id": "194491", "author": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Mal,\r\nI tested the latest kitchen sink with Ti SDK 1.8.1 and ran it on the android emulator(API 2.2). The basic camera feature is working fine. The application is not crashing. Did you clean build the project before running it on SDK 1.8.1? Please clean build it and then run. \r\n\r\n\r\nRegards,\r\nNikhil", "updateAuthor": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-10T23:54:27.000+0000", "updated": "2012-05-10T23:54:27.000+0000" }, { "id": "194582", "author": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can't reproduce it with the latest version of the kitchen sink and Ti SDK 1.8.1", "updateAuthor": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-11T15:41:21.000+0000", "updated": "2012-05-11T15:42:07.000+0000" }, { "id": "285841", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello ,\r\n\r\nWe tested this issue with code bellow. It’s working well in android.Please check this issue with latest SDK tools. Please update the ticket with your sample if you continue to get the crash. If we don't hear back from you, we will assume the issue is invalid and the ticket can be closed.\r\n\r\nh5. Test Environment:\r\nMac OSX 10.8.5\r\nTitanium SDK 3.2.0.GA, \r\nAndroid SDK: 2.3.3, \r\nTi CLI 3.2.0\r\n\r\nh5. Test Code\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow();\r\n \r\n\r\nvar anImageView = Ti.UI.createImageView({\r\n\r\n});\r\nwin1.add(anImageView);\r\n\r\nvar controlview = Ti.UI.createView({\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 20,\r\n});\r\n\r\nwin1.add(controlview);\r\n\r\nvar frmcamera = Ti.UI.createButton({\r\n\tbackgroundImage : 'none',\r\n\tbackgroundColor : '#ff0000',\r\n\ttitle : L('take pic'),\r\n\tcolor : '#fff',\r\n\twidth : 80,\r\n\theight : 50,\r\n\tleft : 10,\r\n});\r\n\r\nfrmcamera.addEventListener('click', function() {\r\n\tfireUpTheCamera();\r\n});\r\n\r\ncontrolview.add(frmcamera);\r\n\r\nfunction fireUpTheCamera() {\r\n\tTitanium.Media.showCamera({\r\n\r\n\t\tsuccess : function(event) {\r\n\t\t\tvar cropRect = event.cropRect;\r\n\t\t\tvar image = event.media;\r\n\r\n\t\t\tTi.API.debug('Our type was: ' + event.mediaType);\r\n\t\t\tif (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n\t\t\t\tanImageView.image = image; \r\n\t\t\t} else {\r\n\t\t\t\talert(\"got the wrong type back =\" + event.mediaType);\r\n\t\t\t}\r\n\t\t},\r\n\t\tcancel : function() {\r\n\t\t},\r\n\t\terror : function(error) { \r\n\t\t\tvar a = Titanium.UI.createAlertDialog({\r\n\t\t\t\ttitle : 'Camera'\r\n\t\t\t});\r\n \r\n\t\t\tif (error.code == Titanium.Media.NO_CAMERA) {\r\n\t\t\t\ta.setMessage('Please run this test on device');\r\n\t\t\t} else {\r\n\t\t\t\ta.setMessage('Unexpected error: ' + error.code);\r\n\t\t\t}\r\n \r\n\t\t\ta.show();\r\n\t\t},\r\n\t\tsaveToPhotoGallery : true,\r\n\t\tallowEditing : false,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t});\r\n}\r\n\r\nwin1.open();\r\n\r\n\r\n{code}\r\n\r\nh5. Step to Test\r\n\r\n# Create a simple project\r\n# Update app.js file with test code\r\n# Run on android device (minimum SDK level 10 for 3.2.0.GA)\r\n# Clicked on “take pic” red color button \r\n# After capturing photo will display in window\r\n\r\nThanks", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-26T09:45:05.000+0000", "updated": "2013-12-27T20:04:46.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }