0.1.3 • Published 8 months ago

manage-external-storage v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

manage-external-storage

Plugin to manage all files in external storage. See explanation here: https://developer.android.com/training/data-storage/manage-all-files

Installation

npm install manage-external-storage

Android Setup

1. Add the following permissions to Android Manifest

<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

2. Add the following line to Android Manifest

some code above...
<application
  android:requestLegacyExternalStorage="true" <-- this one

Usage

// check if can manage
checkManagePermission().then((isManagePermitted) => {
  console.log(isManagePermitted);
});

// request rights to manage
requestManagePermission().then((isManagePermitted) => {
  console.log(isManagePermitted);
});

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago