{ "id": "175705", "key": "TIMOB-28230", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-11-16T21:39:35.000+0000", "created": "2020-11-06T03:41:48.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "cache", "directory", "file", "filesystem" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-16T21:39:35.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": "*Summary:*\r\nOn Android and iOS, we offer an [applicationCacheDirectory|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-property-applicationCacheDirectory] property used to write temporary files to internal storage.\r\n\r\nAndroid supports a sandboxed cache directory for the app on external storage, which typically provides more storage space. Unlike [externalStorageDirectory|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-property-externalStorageDirectory], the external cache directory is not automatically backed-up by the system. This makes it a good location for LARGE temporary files.\r\n\r\nWe should expose this Android-only feature via the following property.\r\n{{Ti.Filesystem.externalCacheDirectory}}\r\n\r\n*Note 1:*\r\nYou do *+NOT+* need the following permissions to read/write to the external cache folder.\r\n* READ_EXTERNAL_STORAGE\r\n* WRITE_EXTERNAL_STORAGE\r\n\r\n*Note 2:*\r\nYou do *+NOT+* need to use the following APIs before reading/writing to this folder.\r\n* [Ti.Filesystem.hasStoragePermissions()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-method-hasStoragePermissions]\r\n* [Ti.Filesystem.requestStoragePermissions()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-method-requestStoragePermissions]\r\n\r\n*Note 3:*\r\nYou do need to check the [isExternalStoragePresent()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-method-isExternalStoragePresent] method to see if external storage is mounted before using this folder.\r\n\r\n*Example:*\r\n{code:javascript}\r\nif (Ti.Filesystem.isExternalStoragePresent()) {\r\n\tconst myFile = Ti.Filesystem.getFile(Ti.Filesystem.externalCacheDirectory, 'MyFile.txt');\r\n\tmyFile.write('Hello World');\r\n}\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Add Ti.Filesystem.externalCacheDirectory support", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1210, "state": "closed", "name": "2020 Sprint 23", "startDate": "2020-11-09T17:49:00.000Z", "endDate": "2020-11-20T17:49:00.000Z", "completeDate": "2020-11-20T17:46:00.641Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "457476", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12253", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-07T06:28:06.000+0000", "updated": "2020-11-07T06:28:06.000+0000" }, { "id": "457520", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-16T21:38:46.000+0000", "updated": "2020-11-16T21:38:46.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }