I am writing an Android app, API Level 10.
I have a main activity that starts a service and puts a parcel containing a class object as an extra for the service intent. Events that the service handles updates the information stored in the class object. How can I access the new class object from the main activity? Is there a way to send an intent or message to the main activity?
Thanks in advance. I have been kinda vague so if you need clarification please let me know.
Yes, Android provides Handlers to do what you need to do. Please read this documentation http://developer.android.com/reference/android/os/Handler.html
Keep in mind though, that a Handler will only be able to handle String messages so what you can do is have a copy of the class object in your main activity and then keep modifying that object using the messages received by the handler (do conditional checking for each type of message and modify the object accordingly). Does this make sense?