#1944 Refactoring file handling

Open
opened 2 weeks ago by TaaviE · 0 comments
TaaviE commented 2 weeks ago
name about
Feature request File handling improvements

Summary:

The current file handling system is getting further and futher limited by newer Android versions, has quite a few inconviniences and should be refactored at some point. I created this issue to keep track of the situation.

Points that should probably be addressed:

  • Support of scoped storage - it’s currently not super mandatory, but probably will be in the next few years. It would be a good idea to add support for it, and use it whenever possible on newer Android versions.

  • GB should limit the URIs/URLs it can handle, I think there’s no point in appearing as being able to handle random shared URLs - e.g. when pressing “Share” in YouTube, GB shouldn’t probably appear as an option.

  • Usage of content:// instead of file:// URIs, primarily in order to avoid FileUriExposedException-s being thrown on newer Android versions.

  • Avoiding things like OutOfMemoryError on low-end devices or with just big files. E.g. util.FileUtils.readAll can currently throw those exceptions.

  • Maybe there’s something else that should be addressed?

External references:

--- name: Feature request about: File handling improvements --- Summary: The current file handling system is getting further and futher limited by newer Android versions, has quite a few inconviniences and should be refactored at some point. I created this issue to keep track of the situation. Points that should probably be addressed: * Support of scoped storage - it's currently not super mandatory, but probably will be in the next few years. It would be a good idea to add support for it, and use it whenever possible on newer Android versions. * GB should limit the URIs/URLs it can handle, I think there's no point in appearing as being able to handle random shared URLs - e.g. when pressing "Share" in YouTube, GB shouldn't probably appear as an option. * Usage of `content://` instead of `file://` URIs, primarily in order to avoid `FileUriExposedException`-s being thrown on newer Android versions. * Avoiding things like `OutOfMemoryError` on low-end devices or with just big files. E.g. `util.FileUtils.readAll` can currently throw those exceptions. * Maybe there's something else that should be addressed? External references: * https://developer.android.com/preview/privacy/storage * https://developer.android.com/about/versions/10/privacy/changes * https://developer.android.com/reference/android/os/FileUriExposedException
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.