{ "id": "113769", "key": "TIMOB-14211", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-05-03T15:56:00.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "30156", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "116736", "key": "TIMOB-14533", "fields": { "summary": "Android: Picture capture returns last photo in gallery, not the one just captured", "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 } } } } ], "assignee": null, "updated": "2018-02-28T20:03:26.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Desc : On an xperia arc, sometimes photos are not present into device and log show a FileNotFoundException on MediaModule#createDictForImage (when calling TiBlob.blobFromFile). This does not all the time, but something like 1 time every 5 times.\r\n\r\nHere is an app.js that reproduce the bug (notice that savePhotoToGallery is false)\r\n\r\n*Test case*\r\n{code:javascript}\r\n// app.js\r\n//\r\nfunction showCamera() {\r\n Ti.Media.showCamera({\r\n success: function(e) {alert('image ok, width ' + e.media.width);},\r\n cancel: function() {alert('cancel');},\r\n error: function() {alert('error');},\r\n showControls: true, // show the controls in the bottom\r\n saveToPhotoGallery: false, // true if you want to save the photo taken in the gallery\r\n autohide: false, // let the app decide when to close the camera\r\n allowImageEditing: false // ?\r\n });\r\n}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n color:'#999',\r\n title:'Click me',\r\n font:{fontSize:40,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'100',\r\n});\r\n\r\nbutton.addEventListener('click', function() {\r\n showCamera();\r\n});\r\n\r\nwin1.add(button);\r\n\r\n// open tab group\r\nwin1.open();\r\n\r\n{code}\r\n\r\nProblem : On file MediaModule.java into onResult method, the cursor returns a image which is already saved into my application bucket. \r\n\r\nThen later in the code, function moveImage is called with the same value for source and destination, leading to the deletion of the image.\r\n\r\nI quick fixed the problem by adding following code at the beginning of method MediaModule#moveImage.\r\n\r\n*MediaModule.java* \r\n{code:java}\r\n if (source == dest) {\r\n Log.e(TAG, \"source (\" +source + \") eq to dest (\" + dest + \"). Not moving file\", Log.DEBUG_MODE);\r\n return;\r\n }\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Photo deleted on Xperia Arc (lt15i)", "creator": { "name": "antoine.joulie", "key": "antoine.joulie", "displayName": "Antoine Joulie", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "antoine.joulie", "key": "antoine.joulie", "displayName": "Antoine Joulie", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "xperia arc lt15i, android 2.3.3 (build 4.0.A.2.368), Titanium 3.1.0.GA", "comment": { "comments": [ { "id": "300914", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Didn't have Xperia Arc device but tried on Xperia(st25i) running 2.3.7 & could not reproduce the issue. Ran an app created using the code above, 5-10 times, every time pic was taken successfully & I did not get any errors.\n\nEnvironment:\nAppc Studio : 3.2.3.201404111117\nTi SDK : 3.2.3.v20140403105720\nMac OSX : 10.8.5\nAlloy : 1.3.1\t\nCLI - 3.2.3-alpha2\nXperia running android 2.3.7", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-14T23:14:04.000+0000", "updated": "2014-04-14T23:14:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }