{ "id": "155055", "key": "TIMOB-20439", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-14T21:38:50.000+0000", "created": "2016-02-22T15:12:09.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" }, { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [ { "id": "51962", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "160696", "key": "TIMOB-23470", "fields": { "summary": "Android: Saving photos to external directory still causing app data size to grow", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-11-15T05:42:37.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": "During our testing we have realized that continuously taking camera images bloats app size. There is currently no way for us to check what is being stored.\r\n\r\n1) Problem Description - taking a bunch of pictures (without saving them) bloats up app internal storage size.\r\n\r\n2) Exact steps to reproduce:\r\nDownload the app [here|https://c.na10.content.force.com/servlet/servlet.FileDownload?file=00PF000000WBSKA].\r\n- install supplied test app\r\n- in application manager: note the size of the app and storage space used\r\n- load supplied app\r\n- press \"Open Camera Pictures\"\r\n- press \"Take\"\r\n- press \"Retake\"\r\n- repeat 10 times\r\n- kill the app\r\n- go back to application manager and note size difference\r\n\r\n3) Expected Behavior - no data to be saved. (Image saving is turned off by default according to docs)\r\n\r\n4) Number of users affected - all Android users ", "attachment": [], "flagged": false, "summary": "Android: Using camera bloats app storage", "creator": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "environment": null, "closedSprints": [ { "id": 963, "state": "closed", "name": "2017 Sprint 22 SDK", "startDate": "2017-10-22T21:43:59.523Z", "endDate": "2017-11-05T22:43:00.000Z", "completeDate": "2017-11-06T16:33:42.425Z", "originBoardId": 114 }, { "id": 948, "state": "closed", "name": "2017 Sprint 19 SDK", "startDate": "2017-09-10T21:24:51.562Z", "endDate": "2017-09-24T21:24:00.000Z", "completeDate": "2017-09-25T17:49:27.460Z", "originBoardId": 114 }, { "id": 597, "state": "closed", "name": "2016 Sprint 06 SDK", "startDate": "2016-03-12T01:30:59.982Z", "endDate": "2016-03-26T00:30:00.000Z", "completeDate": "2016-03-28T03:38:09.726Z", "originBoardId": 114 }, { "id": 951, "state": "closed", "name": "2017 Sprint 20 SDK", "startDate": "2017-09-24T17:50:18.277Z", "endDate": "2017-10-08T17:50:00.000Z", "completeDate": "2017-10-09T20:38:07.840Z", "originBoardId": 114 }, { "id": 968, "state": "closed", "name": "2017 Sprint 23 SDK", "startDate": "2017-11-05T16:37:25.071Z", "endDate": "2017-11-19T16:37:00.000Z", "completeDate": "2017-11-20T18:57:56.565Z", "originBoardId": 114 }, { "id": 939, "state": "closed", "name": "2017 Sprint 17 SDK", "startDate": "2017-08-13T23:08:29.095Z", "endDate": "2017-08-27T23:08:00.000Z", "completeDate": "2017-08-27T21:10:54.125Z", "originBoardId": 114 }, { "id": 959, "state": "closed", "name": "2017 Sprint 21 SDK", "startDate": "2017-10-08T20:38:15.130Z", "endDate": "2017-10-22T20:38:00.000Z", "completeDate": "2017-10-24T23:55:56.605Z", "originBoardId": 114 }, { "id": 944, "state": "closed", "name": "2017 Sprint 18 SDK", "startDate": "2017-08-27T21:13:39.311Z", "endDate": "2017-09-10T21:13:00.000Z", "completeDate": "2017-09-10T21:24:16.435Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "377525", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Salesforce ticket 1[00008173|https://na10.salesforce.com/500F000000oUfKq].\r\nSalesforce ticket 2[00008174|https://na10.salesforce.com/500F000000oUfts].\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-22T15:20:07.000+0000", "updated": "2016-03-08T18:37:18.000+0000" }, { "id": "379207", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, If saveToPhotoGallery is set to false, taking image will increase the app size. \r\n\r\n*Steps to Reproduce*\r\n\r\nsaveToPhotoGallery property must be set to false\r\n{code: javascript}\r\nvar showCamera = function() {\r\n\t\r\n\t\tTi.Media.showCamera({\r\n\t\t\tsuccess:function(event) {\r\n alert('success');\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\tcancel:function() {\t\t\t\r\n\t\t\t\t// called when user cancels taking a picture\r\n\t\t\t},\r\n\t\t\terror:function(error) {\r\n\t\t\t\talert('error');\r\n\t\t\t},\r\n\t\t\tsaveToPhotoGallery:false,\r\n\t\t // allowEditing and mediaTypes are iOS-only settings\r\n\t\t});\r\n\t};\r\n\r\nshowCamera();\r\n\r\n{code}\r\n\r\nActual Result\r\n\r\nEvery photo taken by camera (no matter if later saved or not) will take some space (data on device). There is no way to release that space or get that file, so it will continuously increase taken space until no space is left.\r\nIf you save the image after taking it, than the space taken is doubled (you create additional file). Of course you can delete saved image but it will only release half of taken space.\r\n\r\nThere is no problem if saveToPhotoGallery is set to true\r\n\r\nExpected Result\r\n\r\nSpace taken by the image should be released or there should be the way to get the files taking that space.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-08T16:19:21.000+0000", "updated": "2016-03-08T16:21:46.000+0000" }, { "id": "379256", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On Android, if saveToPhotoGallery is false, we store the image in internal storage and return it via success callback. If you wish to NOT use the image that is returned, you can delete it by doing something like this:\r\n{code}\r\nsuccess:function(event) {\r\n alert('success');\r\n\t\t\t\tvar blob = event.media;\r\n\t\t\t\tvar file = blob.getFile();\r\n\t\t\t\tfile.deleteFile();\r\n}\r\n{code}\r\n\r\nThis is likely the same for iOS.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-03-08T21:58:37.000+0000", "updated": "2016-03-21T20:37:42.000+0000" }, { "id": "379291", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "I am able to reproduce this issue with the given project and given steps. Initially the application manager showed that the app used 23.7 MB internal storage but after following the given steps it becomes 39.4 MB.\r\n\r\nBut if I change the \"openCamera()\" function in the project as follows:\r\n\r\n[Gist Link|https://gist.github.com/N-Salahin/05c9819b41005bb73cd1]\r\n\r\nthen the issue is solved. The app size remains 23.7 MB even after following the steps now.\r\n\r\n*Environment*:\r\n\r\n*Device info:* Nexux7 (android 6.0.1)\r\n*Node.js Version:* 0.12.7\r\n*npm Version:* 2.11.3\r\n*Titanium SDKs:* 5.2.0 and 5.1.2.GA\r\n*Java Development Kit Version:* 1.8.0_73\r\n*Titanium CLI Version:* 5.0.5\r\n", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-03-09T06:10:56.000+0000", "updated": "2016-03-21T20:37:56.000+0000" }, { "id": "380280", "author": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "body": "If I don't use *deleteFile* when is the file flushed from internal storage?\r\n", "updateAuthor": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "created": "2016-03-21T20:42:50.000+0000", "updated": "2016-03-21T20:42:50.000+0000" }, { "id": "381187", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nIt depends on the internal storage, The operation will just increase the app size. And you can clean the data manually from the app. I think the best resolution for an user is to put the delete function in the app and automatically delete a file when not saved. Cause the user might not always clean the cache. So, from a developer perspective using the automatically delete option should be best practice.\r\n\r\nRegards,\r\nSharif", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-31T15:11:34.000+0000", "updated": "2016-03-31T15:11:34.000+0000" }, { "id": "381188", "author": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I disagree. This IS a bug. In my opinion it should be fixed instead of using workarounds. \r\n\r\nThis functionality should be an option of Ti.Media.ShowCamera in CameraOptionsType. \r\n\r\nOtherwise, you rely on developers using workaround that is not documented anywhere.", "updateAuthor": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T15:21:59.000+0000", "updated": "2016-03-31T15:21:59.000+0000" }, { "id": "415535", "author": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "How is this being marked as resolved? Nothing has been done to resolve this issue....", "updateAuthor": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T13:51:54.000+0000", "updated": "2017-03-24T13:51:54.000+0000" }, { "id": "427292", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9362", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-28T00:06:04.000+0000", "updated": "2017-08-28T00:06:04.000+0000" }, { "id": "430561", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-13T23:53:36.000+0000", "updated": "2017-11-13T23:53:36.000+0000" }, { "id": "430614", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-14T21:38:46.000+0000", "updated": "2017-11-14T21:38:46.000+0000" }, { "id": "430659", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Changes are seen in SDK 7.0.0.v20171114202841.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T05:42:37.000+0000", "updated": "2017-11-15T05:42:37.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }