-
Notifications
You must be signed in to change notification settings - Fork 475
[Android] Make db size configurable #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
587c68f
db size on android is now configurable
alexkuttig c2d5908
removed line break
alexkuttig f840a7f
added documentation for increased storage size on android
alexkuttig aab59e3
Update README.md
alexkuttig 17a953c
Update docs/advanced/IncreaseDbSize.md
alexkuttig 3bb688b
Update docs/advanced/IncreaseDbSize.md
alexkuttig d7d6ad0
Update docs/advanced/IncreaseDbSize.md
alexkuttig 573777d
Update docs/advanced/IncreaseDbSize.md
alexkuttig 93f0ee2
Update docs/advanced/IncreaseDbSize.md
alexkuttig 7a5e0d3
added android/ios sections to db size docs
alexkuttig 230e1c4
moved db size change on android to gradle build process
alexkuttig 0ba4992
moved size gradle prop to example project
alexkuttig 0efc595
updated docs for new db increase process
alexkuttig ed57c1f
fixed revert
alexkuttig 1ad778e
removed line-break
alexkuttig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
RNAsyncStorage_compileSdkVersion=28 | ||
RNAsyncStorage_buildToolsVersion=28.0.3 | ||
RNAsyncStorage_targetSdkVersion=28 | ||
RNAsyncStorage_minSdkVersion=19 | ||
RNAsyncStorage_minSdkVersion=19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Increase Async Storage size | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd put here sections for platforms, i.e use H2 for |
||
## Android | ||
|
||
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](https://www.sqlite.org/limits.html). | ||
|
||
### 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. | ||
|
||
|
||
## iOS | ||
|
||
Async Storage size is not limited programmatically on iOS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the link here still correct?