ModernStorage is a group of libraries that provide an abstraction layer over storage on Android to simplify its interactions by apps developers. ModernStorage is:
- Easy to use: ModernStorage focuses on API simplicity. Rather than calling four separate methods with the Android Framework API, you only need to call one.
- Opinionated: ModernStorage is written by the Android DevRel team in collaboration with the Android Storage team, taking in account all the feedback from the developer community to address common issues when dealing with storage on Android.
ModernStorage is available on
// For storage permissions checking implementation("com.google.modernstorage:modernstorage-permissions:1.0.0-alpha06") // For storage interactions using Okio FileSystem API implementation("com.google.modernstorage:modernstorage-storage:1.0.0-alpha06")
Alternatively use the Bill of Material to just have to define the version once, and then define which modules you need.
implementation("com.google.modernstorage:modernstorage-bom:1.0.0-alpha06") implementation("com.google.modernstorage:modernstorage-permissions") implementation("com.google.modernstorage:modernstorage-storage") // The Bill of Material includes Okio and Photo Picker as well implementation("com.google.modernstorage:modernstorage-photopicker") implementation("com.squareup.okio:okio")
Is it ready?¶
It's in progress! Our current version is 1.0.0-alpha06. As it's an alpha release, we're expecting API breaking changes between releases.
We're looking for a stable release in 2022 (we don't have yet a precise date). We actively listen to your feedback to make ModernStorage the default library for storage interactions on Android.
We're still at an early stage sharing the vision of ModernStorage and would love to have more feature requests and ideas proposed as issues. We would be glad to review pull requests, but keep in mind that we want to minimize expanding the API surface until we get more feedback from developers. Make sure to read the Contributing page first though.
Copyright 2021 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.