Same object access in different activity?

I have a Java class say

class J


and I have 2 activity say A1,A2. In A1 I created a object of class J.

  J obj = new J();

Question- I want to access the same object(obj) in A2.

   obj // how can I access this object here? this is created in A1.


Implement Parcelable for that object. And send that object from A1 to A2 into intent extra.

Parcel data to pass between Activities using Parcelable classes is a very good example to implement Parcelable.

Leave a Reply

Your email address will not be published. Required fields are marked *