Skip to content

Commit 5009d52

Browse files
authored
Update README.md
1 parent e3a2a13 commit 5009d52

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ android.os.TransactionTooLargeException: data parcel size 535656 bytes Bundle st
1313
Any developer knows about bundles and their size limitations, but despite this, we repeatedly encounter the insidious TransactionTooLargeException. But there is a solution! Introducing, BundleSaver!
1414

1515
### How to solve the problem of large data in Bundle?
16-
The problem can arise in large applications with deeply nested screens and complex states. When a Binder transaction exceeds 1 MB, a TransactionTooLargeException will occur.
17-
18-
### How does it work?
16+
The problem can arise in large applications with deeply nested screens and complex states. When a Binder transaction exceeds 1 MB, a TransactionTooLargeException will occur. What to do?
1917
1. In onSaveInstanceState, serialize the bundle into a set of bytes and write it to disk (and Map).
2018
2. In onRestoreInstanceState, deserialize it back into a bundle and restore the state.
2119
3. Upon exiting the screen, delete the file.

0 commit comments

Comments
 (0)