I have objects that I transfer between activations. Faced a problem. I have an object from either, I make a proxy class for it from Serializable. Intent is thrown normally, but in the new activation it is empty. Can anyone have any guesses? Before the question I found and read How to serialize an object that does not implement any of the serialization interfaces? , I did it from the very beginning, but cheto does not work =)
@Gorets - you're an experienced guy, but you’re talking neponyatki.
In Android, the only way (apart from of course global variables and so on) to communicate between the Activity is the
There is no curvature or dampness - everything works fine. Maybe you have some kind of misunderstanding how it works.
In your particular case use
Bundle bundle=new Bundle(); bundle.putSerializable("MY_OBJECT", myObject);
To correctly transfer an object between an Activity, you need to implement the Parcelable interface in its class. Serializable in Android is also supported, but in the first case fewer improvements are needed in the classroom and with performance should be better. This article is a good example of the transfer of objects between the Activity.
There seems to be a parcelable and not serializable.