In order to pass some objects between two activities in my android application, i let them implement parcelable and sent them to the next activity. Unfortnatly, this sometimes leads into a "FAILED BINDER TRANSACTION" Error which is caused by a too large object.
I found only one solution to fix that: splitting the object into multiple smaller objects. As this seems to be more of a nasty hack than a solution to me, i searched for another method.
Another often mentioned method to avoid that error is to put the Object into a static map provided by a singelton and send the key of the object. I dont like this method, too. I have to keep track of the maps size in order to not use to much memory while keeping all needed objects available in this map as i cant put them into a bundle on onSaveInstanceState(). This seems to need a lot of extra-development.
My own solution:
I found out that the json string representation of the objects are much smaller than the actual objects (and therefore can easily be passed via a bundle). So, is there any benefit of the singelton solution over simply sending a string representation of the object and reassemble it in my second activity?
greetings danijoo