Chiggins
Chiggins

Reputation: 8397

How can I share an Object between a running Service and Activity

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?

Upvotes: 1

Views: 3914

Answers (2)

Chiggins
Chiggins

Reputation: 8397

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.

Upvotes: 0

Related Questions