https://redmine.stoutner.com/https://redmine.stoutner.com/favicon.ico?16699090422019-07-23T12:21:00ZStoutner - RedminePrivacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=13062019-07-23T12:21:00ZDazed Dazed
<ul></ul><p>Implementing this should have the additional benefit that users can select alternative storage locations other than shared storage and avoid leaking all downloads to every app with storage permission.</p>
<p>I say this with slight hesitation as I think some functionality related to this is/was/may have been broken in AOSP/Android or some of the many forks, but I suspect things will improve with the focus on scoped storage, and it may just work for some now.</p>
<p>Checked out the functionality of your export function and found exporting to a location other than default gave an empty file.</p> Privacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=13082019-07-24T18:07:59ZSoren Stoutnersoren@stoutner.com
<ul><li><strong>Subject</strong> changed from <i>Avoid needing storage permission</i> to <i>Implement scoped storage with API 29</i></li><li><strong>Assignee</strong> set to <i>Soren Stoutner</i></li></ul><p>I think you have misunderstood the Android documentation. Privacy Browser already uses the Storage Access Framework, both as a client and as a provider. For example, when importing and exporting settings, when clicking the Browse button, a Storage Access Framework request is sent to the system file picker using ACTION_OPEN_DOCUMENT for import and ACTION_CREATE_DOCUMENT for export. However, Privacy Browser isn't actually able to use the returned file path without the storage permission if the file path is outside the app directories.</p>
<p>Scoped storage is indeed an improvement on the situation, and I am intending to implement it in Privacy Browser, but the benefits will only be seen by users with devices running Android Q (API 29) or higher. However, as documented in the link on scoped storage, the file permissions will still be required.</p> Privacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=13112019-07-24T18:29:15ZSoren Stoutnersoren@stoutner.com
<ul></ul><p>Also, a note on the commend about empty export files. If you use the Browse button to find an export file location, it calls ACTION_CREATE_DOCUMENT via the Storage Access Framework. When you select the file in the file browser, it creates that file with 0 bytes. If you have selected a file location that would require the storage permission, Privacy Browser will prompt for that permission. If it is denied, Privacy Browser displays an error message saying it can't write to that location, leaving that 0 byte file behind.</p>
<p>None of this is really a bug. Rather, it is the way Android storage works.</p> Privacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=13292019-09-04T09:40:49ZDazed Dazed
<ul></ul><p>On LineageOS Oreo, using Twidere from Fdroid app store, without it having storage permission, I can save an image, viewed in Twidere, using the 'save to …' option in the menu to any location on the device.<br />Not got time to work out how they do this, but it works. Interested to know how, if you do explore.</p> Privacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=13302019-09-05T07:13:07ZSoren Stoutnersoren@stoutner.com
<ul></ul><p>I will take a look at Twidere and see if I can implement something similar.</p> Privacy Browser Android - Feature #478: Implement scoped storage with API 29https://redmine.stoutner.com/issues/478?journal_id=16082020-07-30T15:07:26ZSoren Stoutnersoren@stoutner.com
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>This feature request is also being tracked at <a class="external" href="https://redmine.stoutner.com/issues/546">https://redmine.stoutner.com/issues/546</a>. I am going to close this one and continue tracking progress there.</p>