{ "id": "122335", "key": "AC-2125", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-22T22:21:48.000+0000", "created": "2013-11-12T04:37:57.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:06.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": [], "description": "Methods for opening Photo gallery (openPhotoGallery) and Show Camera methods are not working on android 4.0.4 version ", "attachment": [], "flagged": false, "summary": "Open Photo Gallery and Show Camera Methods are not working on Android 4.0.4 version with Titanium Studio 3.1", "creator": { "name": "anuja2487@gmail.com", "key": "anuja2487@gmail.com", "displayName": "Anuja Dharmadhikari", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anuja2487@gmail.com", "key": "anuja2487@gmail.com", "displayName": "Anuja Dharmadhikari", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 4.0.4 Emulator and Actual Device ", "comment": { "comments": [ { "id": "280527", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe have tested this issue with the test code below. It’s working fine for us. Please try out this code to see if you can reproduce it. If you continue to encounter this issue, please send us your test sample.\r\n\r\nRegards,\r\n\r\n\r\nh5. Test Environment:\r\n\r\nOS: MAC OS X 10.8.5\r\n \r\nTi SDK: 3.1.3 GA \r\nTi CLI: 3.2.0\r\nAndroid SDK 4.2.2 Device \r\nAndroid SDK 4.0.3 in Emulator\r\n\r\nh5. My test code \r\n{code:javascript}\r\n var win = Ti.UI.createWindow();\r\n\r\nvar contenner = Ti.UI.createView({\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 0,\r\n\tbackgroundColor : '#eee',\r\n\tborderColor : '#eee',\r\n\tlayout : 'vertical',\r\n});\r\nwin.add(contenner);\r\n\r\n var anImageView = Ti.UI.createImageView({ \r\n\twidth : 'auto',\r\n\theight : 'auto',\r\n\ttop : 20,\r\n});\r\ncontenner.add(anImageView);\r\n\r\n \r\n\r\nvar frmcamera = Ti.UI.createButton({\r\n\tbackgroundImage : 'none',\r\n\tbackgroundColor : '#ff0000',\r\n\ttitle : 'Open Camera',\r\n\tcolor : '#fff',\r\n\twidth : Ti.UI.SIZE,\r\n\theight : 50,\r\n\tfont : {\r\n\t\tfontSize : 14, \r\n\t},\r\n\tleft : 10,\r\n});\r\n\r\nfrmcamera.addEventListener('click', function() {\r\n\tfireUpTheCamera();\r\n});\r\n\r\ncontenner.add(frmcamera);\r\n\r\nvar frmgalary = Ti.UI.createButton({\r\n\tbackgroundImage : 'none',\r\n\tbackgroundColor : '#ff0000',\r\n\ttitle : 'Open Gallery',\r\n\tcolor : '#fff',\r\n\twidth : Ti.UI.SIZE,\r\n\theight : 50,\r\n\tfont : {\r\n\t\tfontSize : 14, \r\n\t},\r\n\tright : 10,\r\n});\r\n\r\nfrmgalary.addEventListener('click', function() {\r\n\tTi.Media.openPhotoGallery({\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\tsuccess : function(e) {\r\n\t\t\tanImageView.image = e.media;\r\n\r\n\t\t},\r\n\t\tcancel : function() {\r\n\t\t},\r\n\t\terror : function(err) {\r\n\t\t}\r\n\t});\r\n});\r\n\r\ncontenner.add(frmgalary);\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\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\t// create alert\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\t// set message\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\t// show alert\r\n\t\t\ta.show();\r\n\t\t},\r\n\t\tsaveToPhotoGallery : true,\r\n\t\tallowEditing : true,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t});\r\n}\r\n\r\nwin.open();\r\n\r\n{code} \r\n\r\n \r\n\r\nh5. Step to test\r\n1.\tCreate a new project\r\n2.\tPaste test code in app.js\r\n3.\tNow run on android device/Emulator \r\n4.\tClick on Open Gallery/ Open Camera button \r\n5.\tSelect photo from gallery or take photo from camera \r\n\r\n h5. Expect Result/Actual Result\r\nWorking as expected.\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-21T12:06:04.000+0000", "updated": "2013-11-21T16:44:11.000+0000" }, { "id": "280825", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Working fine with 3.1.3", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-22T23:39:56.000+0000", "updated": "2013-11-22T23:39:56.000+0000" }, { "id": "280862", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "Not work with titanium_mobile 3.2.0.v20131122125648, at least \"Show Camera\".\nTested in real android device 4.2.1 and Genymotion 2.1 with android 4.3", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2013-11-23T03:30:12.000+0000", "updated": "2013-11-23T03:30:12.000+0000" }, { "id": "280863", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "I confirm that working fine with 3.1.3.GA", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2013-11-23T03:32:12.000+0000", "updated": "2013-11-23T03:32:12.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }