In my android application i am setting some value in one activity(Activity A) class and i am getting those values in another non activity class(Non Activity B). My issue is to get those set values i need the same object by which i had set in Activity A. How to get the same object?
Asked
Active
Viewed 113 times
0
-
Possible duplicate of [What's the best way to share data between activities?](http://stackoverflow.com/questions/4878159/whats-the-best-way-to-share-data-between-activities) – Hugo Feb 22 '16 at 10:17
-
Possible duplicate of [Keep the account info in all activities in android studio](http://stackoverflow.com/questions/35472137/keep-the-account-info-in-all-activities-in-android-studio) – Yash Feb 22 '16 at 10:44
2 Answers
0
For achieving it, you can use Intent , static fields , singleton or local storage like shared preference or sqlite.

Sunny Bansal
- 574
- 1
- 4
- 12