{ "id": "175383", "key": "TIMOB-28057", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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-25T15:26:03.000+0000", "created": "2020-07-30T03:14:57.000+0000", "epic": { "id": 175371, "key": "TIMOB-28045", "name": "Android 11: Implement Support", "summary": "Android 11: Implement Support", "color": { "key": "color_3" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "WebView", "android", "file" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-25T15:26:03.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\nIf a webpage displayed by {{Ti.UI.WebView}} has an {{}} element for taking camera photos, then our Android code will save the photo to \"public\" external storage which is no longer allowed due to Android's \"scoped storage\" rules. The photo must be saved to a different location.\r\n\r\n*Note:*\r\nAn example on how to implement file/image selection in HTML can be found here...\r\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\r\n\r\n*To-Do:*\r\nOur [TiWebChromeClient.java|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java] code needs to replace its usage of the following method call.\r\n{{Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)}}\r\n\r\nBest solution would be to let the camera app store the photo to its default location and use a {{ContentResolver}} to retrieve an {{InputStream}} to the photo.\r\n\r\nThere is also an Android 11 \"package visibility\" issue in our [TiWebChromeClient.java|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java] code where we use the Java {{resolveActivity()}} method. We should remove our usage of this method since it will require a {{}} element in the \"AndroidManifest.xml\" to work. Instead, wrap the {{startActivityForResult()}} method call with a try/catch block in case no activity was found.\r\n", "attachment": [ { "id": "67543", "filename": "flower.mp4", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-12T03:12:28.000+0000", "size": 1128375, "mimeType": "video/mp4" }, { "id": "67553", "filename": "WebViewSelectImageTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-19T02:49:31.000+0000", "size": 1085, "mimeType": "application/x-javascript" }, { "id": "67554", "filename": "WebViewSelectVideoTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-19T02:49:31.000+0000", "size": 1172, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Modify WebView to use scoped storage for file selection", "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": 1206, "state": "closed", "name": "2020 Sprint 19", "startDate": "2020-09-14T20:01:00.000Z", "endDate": "2020-09-25T20:01:00.000Z", "completeDate": "2020-09-28T15:30:19.875Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "456948", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-19T03:58:21.000+0000", "updated": "2020-09-19T03:58:21.000+0000" }, { "id": "457210", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "FR passed for this part of the PR", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2020-10-08T12:45:57.000+0000", "updated": "2020-10-08T13:28:56.000+0000" }, { "id": "457723", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.3.0.v20201125050632}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/12105", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-25T15:25:47.000+0000", "updated": "2020-11-25T15:25:47.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }