I have an API Object that I made, and I would like to share it between a running Service and various Activities in my app, almost like if I was to make the class static. How could I go about sharing the created object between the two?
Asked
Active
Viewed 3,881 times
2 Answers
1
You may find the following helpful.
Binding a Service to an android.app.Activity vs Binding it to an android.app.Application
Android Service interacting with multiple activities
Alternatives for Pushing data from an Android Service to an Activity

Community
- 1
- 1

Soumya Simanta
- 11,523
- 24
- 106
- 161
-
1Ha ha awesome. I love it when the answer is along the lines of "I'm not trying to be a jerk, but I am going to politely point out that a quick search could likely have been all you needed" – Hamy Aug 08 '10 at 04:35
0
I figured out the best way to do this is to have a class that holds all the information that you want, and to use that class through each activity and service.

Chiggins
- 8,197
- 22
- 56
- 81
-
-
1@Chiggins, Can you please share some more information or any code example ? – Bipin Vayalu Jul 15 '14 at 10:50
-