New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Use storage access framework for importing WADs #8962
Conversation
|
Make sure this works on an actual Android TV device. I don't know if this was fixed but the last time I checked (~ 2 years ago), Android TV didn't ship with the DocumentsUI system app, which made SAF do nothing when an app requested it. If that's still the case we'll need some sort of fallback... |
|
According to https://commonsware.com/blog/2017/12/27/storage-access-framework-missing-action.html, it works on the Shield TV, so it should be fine ;) But more seriously, that's some really weird behavior, and I agree that it would be a good idea to test it before this is merged. Adding a fallback wouldn't be too hard... as long as there are no devices that have this problem and run Android 11. |
|
Well, we should have plenty of time. This issue seems exclusive to some Android TV devices, I've never seen an Android phone missing the DocumentsUI app (not even on heavily skinned ones like Xiaomi), and Android TV releases seems to follow a different schedule: at the time of this comment, Android TV 9.0 still is the latest version available, with no ETA on when Android TV 10 will be actually released... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on my Android 9 device.
869c1c1
to
3613ff2
Compare
3613ff2
to
bbd1993
Compare
bbd1993
to
38591ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Currently all file types are visible in the new storage access framework. I haven't worked with
ACTION_OPEN_DOCUMENTbefore but it may be possible to restrict the file types to the relevant ones. See https://stackoverflow.com/questions/33117592/restricting-selectable-file-types-via-intent-in-android. - Can access to
ACTION_OPEN_DOCUMENTbe blocked ifWRITE_EXTERNAL_STORAGEpermission isn't granted? See Android: Improve WRITE_EXTERNAL_STORAGE denial #9061.
This only works for MIME types and not file name extensions, and there is no MIME type we can use for WAD files as far as I know. An unfortunate limitation of the framework.
|
Fair point, if this framework is needed for scoped storage we'll need to accept that.
Although that's true, the process of installing the WAD itself would require that permission. Since the actions that follow |
38591ce
to
052d785
Compare
|
I've made the Install WAD action check for directory initialization. |
fd577a7
to
15ceb1f
Compare
15ceb1f
to
96e4554
Compare
|
For the reference, the first commit of this PR ("Android: Add content provider support to File::IOFile") was merged as part of PR #8902. |
This is part of my efforts to add support for scoped storage. I figured I would start with a relatively simple feature to make sure that everyone is fine with the approach I'm taking before I tackle more complicated features like the game list.
96e4554
to
8f71211
Compare
This is part of my efforts to add support for scoped storage. I figured I would start with a relatively simple feature to make sure that everyone is fine with the approach I'm taking before I tackle more complicated features like the game list.