tags:

views:

72

answers:

2

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?

+1  A: 

You may find the following helpful.

http://stackoverflow.com/questions/3154899/binding-a-service-to-an-android-app-activity-vs-binding-it-to-an-android-app-appl

http://stackoverflow.com/questions/3141632/android-service-interacting-with-multiple-activities

http://stackoverflow.com/questions/3149339/alternatives-for-pushing-data-from-an-android-service-to-an-activity

Soumya Simanta
Ha 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
A: 

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