Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Libraries/Storage/AsyncStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ var RCTAsyncStorage = RCTAsyncRocksDBStorage || RCTAsyncSQLiteStorage || RCTAsyn
* `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite
* based on what is available.
*
* iOS doesn't have any storage limits, but on Android the database is limited to
* 6 MB by default. To change the limit, you can modify the `onCreate()` method
* in your your project's `MainApplication.java`:
* ```
* // add the following import
* import com.facebook.react.modules.storage.ReactDatabaseSupplier;
*
* // modify `onCreate()` method
* @Override
* public void onCreate() {
* // ...existing code, including `super.onCreate()` call
*
* // Increase the maximum size of AsyncStorage
* long size = 100 * 1024L * 1024L; // 100 MB
* ReactDatabaseSupplier.getInstance(getApplicationContext()).setMaximumSize(size);
* }
* ```
*
* The `AsyncStorage` JavaScript code is a simple facade that provides a clear
* JavaScript API, real `Error` objects, and simple non-multi functions. Each
* method in the API returns a `Promise` object.
Expand Down