I mean, we have two objects:
MyObject object1 = new MyObject();
MyObject object2 = new MyObject();
And they have difference references, for example
com.example.utente.myapp.MyObject@38540215
com.example.utente.myapp.MyObject@95713921
Is it possible to give the second reference to the first object in such a way the first object becomes the second using the references?
I can't do object1 = object2 because I'm passing object1 with Serializable so I'm creating a copy of object1 which is called object2 which has a different reference (because I'm using Serializable) so I can't interact with the objects together. These objects are activities. I'm looking for something like activity2.setReference(...); in such a way activity2 has the same reference of activity1
Original question : Android: intent.getExtras().getSerializable(Constants.codiceMainActivity) is null