-1

I am passing Array List of string values to next activity,

some mobile it is working properly ,in some it does not pass values.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Max
  • 11
  • This is NOT a duplicate of the linked question! The linked question asks for clarification on HOW to pass an `ArrayList` in an `Intent`. Obviously OP is already doing this, so doesn't need instructions on how to do that. OP says **it works on some devices, but not on others"** – David Wasser Mar 09 '18 at 12:42

1 Answers1

0

The probably doesn't work on some devices because you are trying to pass too much data and you are overflowing the internal buffer that is used for IPC (interprocess communication). In general you shouldn't pass large arrays in an Intent. There are other ways of doing this:

  • Share the data directly between multiple Activities by storing the data in a public static variable.
  • Store the data in some persistent storage (file, SQLite database, SharedPreferences
David Wasser
  • 93,459
  • 16
  • 209
  • 274