0

I am getting a TransactionTooLargeException error in my app

I have an EditText in my app and I have pasted more than 1207324 bytes of text here

Up to this point, no error occurs, but TransactionTooLargeException occurs when moving to another activity.

It doesn't pass any data to other activities, it just opens a new activity.

How can I resolve TransactionTooLargeException?

tareq albeesh
  • 1,701
  • 2
  • 10
  • 13
  • Does this answer your question? [What to do on TransactionTooLargeException](https://stackoverflow.com/questions/11451393/what-to-do-on-transactiontoolargeexception) – Nongthonbam Tonthoi May 25 '22 at 11:43
  • `It doesn't pass any data to other activities,` You are not saving that text in onSaveInstanceState() ? Does it happen at rotating the device too? – blackapps May 25 '22 at 11:52
  • @blackapps: "You are not saving that text in onSaveInstanceState() ?" -- text in an `EditText` is automatically placed in the saved instance state. – CommonsWare May 25 '22 at 12:02

1 Answers1

0

Validate your form. If the user has entered too much text (e.g., 100KB), warn them and force them to make changes before you proceed to the next activity.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491