{ "id": "111529", "key": "TIMOB-13159", "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": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-18T20:35:19.000+0000", "created": "2013-03-22T06:05:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_imageview", "qe-closed-3.1.0", "qe-testadded", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "27690", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "93337", "key": "TIMOB-9580", "fields": { "summary": "Android: Images captured using Ti.Media.showCamera() are written to SD card on Android", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "28532", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "114041", "key": "TIDOC-1145", "fields": { "summary": "TiSDK 3.1.1 Release Notes", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-03T10:29:23.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": "Run the test case mentioned at https://gist.github.com/4527649\r\n\r\nAfter taking the picture, and saving it, hit 'back' to close the app.\r\n\r\nThen navigate to the gallery app, and you will find the image you just took to be blank (it should be under ). \r\n\r\nNOTE if you push the 'home' button instead of 'back' it will save correctly.\r\n\r\nThis is a regression and was working in 2.1.X", "attachment": [], "flagged": false, "summary": "Android: Images are blank/ have an empty entry when saved to the photo gallery", "creator": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Galaxy S2 (Just the one I used, but producible on most devices)", "comment": { "comments": [ { "id": "246969", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This regression is caused by [PR#2475|https://github.com/appcelerator/titanium_mobile/pull/2475].", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-10T22:55:51.000+0000", "updated": "2013-04-10T22:55:51.000+0000" }, { "id": "247178", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a behavior change due to PR#2475. Before that commit, we did not delete the temporary image file so it always had a copy of the image in the gallery no matter saveToPhotoGallery was set to true or false. After that commit, we delete all the temporary files when the app exits so the image saved in the gallery is removed if saveToPhotoGallery is false. But since the gallery can not refresh automatically, we can still see a blank image in the gallery. [PR#4148|https://github.com/appcelerator/titanium_mobile/pull/4148] should resolve the blank image issue.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T21:52:33.000+0000", "updated": "2013-04-11T21:55:18.000+0000" }, { "id": "247182", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4148\r\nFor FR:\r\n1. Please run the test case below.\r\n2. Take a picture and click the \"Save\" button.\r\n3. Click 'back' to close the app.\r\n4. Check the photo gallery. The image you just took should *NOT* be there.\r\n5. Change the test case line 48 to \"saveToPhotoGallery: true\". Then repeat 2-3.\r\n6. Check the photo gallery. The image you just took should be there.\r\nTest case:\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nvar imageView = Ti.UI.createImageView({height: Ti.UI.FILL, width: Ti.UI.Fill});\r\nwin.add(imageView);\r\n\tTitanium.Media.showCamera({\r\n \r\n\t\tsuccess:function(event)\r\n\t\t{\r\n\t\t\tTi.API.info('#### Camera Success');\r\n\t\t\tvar cropRect = event.cropRect;\r\n\t\t\tvar image = event.media;\r\n\t\t\tTi.API.info(image.length);\r\n\t\t\tvar filename = Titanium.Filesystem.tempDirectory + \"/\"+ 'camera_photo' + new Date().getTime() + \".png\";\r\n\t\t\tTi.API.info(filename);\r\n\t\t\tvar f = Titanium.Filesystem.getFile(filename);\r\n\t\t\tTi.API.info(f.nativePath);\r\n\t\t\tif (f.exists()) {\r\n\t\t\t\tTi.API.info('The file exist , trying to delete it before using it :' + f.deleteFile());\r\n\t\t\t\tf = Titanium.Filesystem.getFile(filename);\r\n\t\t\t}\r\n\t\t\tf.write(image);\r\n\t\t\talert('Camera Success! The file size is '+f.size+' bytes.\\n Now trying to assign it to an image on the screen (this may fail for hi res images)')\r\n\t\t\timageView.image = f.nativePath;\r\n\t\t},\r\n\t\tcancel:function()\r\n\t\t\r\n\t\t{\r\n\t\t\tTi.API.info('#### Camera Cancel');\r\n\t\t},\r\n\t\terror:function(error)\r\n\t\t{\r\n\t\t\t// create alert\r\n\t\t\tTi.API.info('#### Camera Error');\r\n\t\t\tvar a = Titanium.UI.createAlertDialog({title:'Camera'});\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{\r\n\t\t\t\ta.setMessage('Device does not have video recording capabilities');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\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: false\r\n\t});\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T22:00:28.000+0000", "updated": "2013-04-11T22:01:05.000+0000" }, { "id": "248626", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4196", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-22T17:39:21.000+0000", "updated": "2013-04-22T17:39:21.000+0000" }, { "id": "250914", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with:\nMac OS 10.8.3\nSafari: 6.0.4\nXcode 4.6\nCLI: 3.1.0\ntitanium-code-processor: 1.0.1\nAlloy: 1.1.2\nTitanium SDK version 3.1.1.v20130508001914\nNexus 4 4.2.1\n\nImages with saveToPhotoGallery: true are appearing in the gallery.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-08T23:04:44.000+0000", "updated": "2013-05-08T23:04:44.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }