I have 2 activities and I’m trying to send from Activity A to Activity B some huge objects that implements Serializable. The problem is the time taken by Android OS to serializate this objets. Is there any way to send parameters between Activities? I tryed sending to Application object and getting it in the next activity but I think this way is dirty…
Share
Here are some alternate ideas you could use instead of passing huge amount of data by
SerializableorParcelable:Service. It would hold the data, process it and deliver when needed. Afterwards it can be terminated.Applicationobject (like this). “Global reference” doesn’t usually sound good, but this is recommended in some cases. Even further, if you still find it “dirty” you can useWeakReferenceand get rid of it as soon as it’s passed to secondActivityand used by it.Activity(without starting the second one) and just play withViews. If it’s possible for you of course.