DEV Community

Discussion on: What is AsyncStorage in React Native?

Collapse
 
flexgrip472 profile image
Ray Aguilar

The 6mb limit is not accurate. It’s unlimited on iOS and configurable on android. Just thought you’d wanna know.

Collapse
 
amanhimself profile image
Aman Mittal

Thanks! What I wanted to say was that on Android it is the default size. I'll make amendments.

Collapse
 
efleurine profile image
Emmanuel • Edited

To increase the limit

// MainApplication.getPackages()
long size = 50L * 1024L * 1024L; // 50 MB
com.facebook.react.modules.storage.ReactDatabaseSupplier.getInstance(getApplicationContext()).setMaximumSize(size);
Enter fullscreen mode Exit fullscreen mode

Ref: github.com/stockulus/pouchdb-react...

Thread Thread
 
mrmovl profile image
Tomke Reibisch

Is there an upper limit to this? What if I need to store big video files?

Thread Thread
 
sshanzel profile image
Hansel Solevilla

If iOS has unlimited storage, i think it would be safe to say the same on android, i'm no expert and had no extensive experience in Android but i think to have the most reliable answer is to look at the Documentation.

Thread Thread
 
amanhimself profile image
Aman Mittal

Check the official docs for Android here: github.com/react-native-community/...

Collapse
 
shailpatel1 profile image
Shail Patel • Edited

hey @flexgrip472
you are 100 % sure ?
do you have any docs where i can confirm this ?