This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
Update on ModernStorage #68
yrezgui
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone 👋
A few months ago, someone posted a thread on a library I’ve been working named ModernStorage. For the ones who haven’t heard about it before, it’s a library aiming to simplify storage interactions on Android. I’ve been working a lot on it with my colleague @nic0lette, and after gathering some feedback and trying some experiments, I’m happy to share some updates about it.
Initially, we started with two separate packages:
mediastore
for MediaStore interactions andfilesystem
for Storage Access Framework interactions. The first one was a simplified wrapper around MediaStore API while the second was implementingjava.nio.File.FileSystem
(API here). The main blocker for us was the requirement on API 26+ forjava.nio
. We tried to look for possibilities to bring it on older devices, but it was a dead end.While looking for alternative paths, @nic0lette pinged me on an experimental filesystem API in Okio 3.x when it was in alpha that got my attention. I had the chance to chat with Jesse Wilson who is one of the maintainers of Okio, and he explained to me in depth the spirit of the library, and I was sold on!
Fast-forward to today, I’ve deprecated the
mediastore
andfilesystem
packages and created new ones that work on API 21+ with the release1.0.0-alpha03
:permissions
to check storage permissions and soon to request themstorage
to interact with files using the Okio filesystem API, which lets you read and write content of a file only using its URI, whether it’s a MediaStore or a DocumentProvider (SAF) one, but also get metadata and folder file listing (Note: some methods aren’t implemented yet)I wrote a sample app highlighting some use cases, and I’m looking to create other packages to answer other storage-related needs.
Now I need your help 🙏. The library is still experimental, but I want to shape it based on your feedback to make sure it’s ready for the next version of Android, which will ease your migration with announced changes (like the Photo Picker. There are many features I want to implement, but I’m unsure how developers feel about them, please add ideas and feedback in the discussions tab.
Thanks 👍
Beta Was this translation helpful? Give feedback.
All reactions