Search code examples
androidandroid-intentandroid-activitytransactionsandroid-binder

Fail to pass a List with a lot of Itens between Activities


I have this code:

Intent intent = new Intent(currentActivity, nextActivity);
Bundle bundle = new Bundle(); bundle.putSerializable(nameParameter, serializable);

My serializable is a ArrayList with a bunch of elements. When I use the method startActivity. A FAILED BINDER TRANSACTION happens. How I can solve this?


Solution

  • an intent has a limited max size. consider passing your data in some other way: either as a list of IDs, in a file, in a database...