mgks / Android-SmartWebView

A simple use webview integrated w/ native features to help create most advanced hybrid applications.
https://mgks.dev/smart-webview
MIT License
551 stars 276 forks source link

TransactionTooLargeException issue #254

Closed perochak closed 1 year ago

perochak commented 1 year ago

Hey

Facing issue when taking photos using camera for multiple instances.

RuntimeException: android.os.TransactionTooLargeException: data parcel size 639572 bytes
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:160)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:201)
    at android.app.ActivityThread.main(ActivityThread.java:6861)

Any help?

perochak commented 1 year ago

This worked for me `protected void onSaveInstanceState(Bundle outState ){ int osVersion = android.os.Build.VERSION.SDK_INT; if ( osVersion < Build.VERSION_CODES.N) { super.onSaveInstanceState(outState); asw_view.saveState(outState); }

}`