Skip to content

fede4ka1245/manage-external-storage

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

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors