Increasing Storage size
Supported platforms:
Android
Note: This feature is obsolete when Next storage feature is enabled.
Motivation
Current Async Storage's size is set to 6MB. Going over this limit causes database or disk is full
error. This 6MB limit is a sane limit to protect the user from the app storing too much data in the database. This also protects the database from filling up the disk cache and becoming malformed (endTransaction() calls will throw an exception, not rollback, and leave the db malformed). You have to be aware of that risk when increasing the database size. We recommend to ensure that your app does not write more data to AsyncStorage than space is left on disk. Since AsyncStorage is based on SQLite on Android you also have to be aware of the SQLite limits.
Increase limit
Add a AsyncStorage_db_size_in_MB
property to your android/gradle.properties
:
AsyncStorage_db_size_in_MB=10
Now you can define the new size in MB. In this example, the new limit is 10 MB.