jocmp / capyreader

A smallish Android RSS reader
http://capyreader.com/
MIT License
136 stars 4 forks source link

Fix bug causing background crashes #183

Closed jocmp closed 3 months ago

jocmp commented 3 months ago

The "saveState" method on WebView will persistent the entire contents of the webview and info about the backstack. This can rack up megabytes worth of data. The bundle limit is about 500KB.

The fix is to only save the scroll-y position and rebuild the webview from other state. This prevents the bundle size from exceeding the max size of an integer.

Ref: https://developer.android.com/reference/android/os/TransactionTooLargeException

Link #179, Closes #184