Thanks! After spending hours looking at tutorials for this, yours was by far the easiest to follow!
I have one related question.
You say that an "object that is passed between the two needs to be marshaled"
Is there any way to pass objects between processes (using serializable perhaps?)
If I could do this, It would save me tons of time. (From writing a protocol, and then going back and changing it in both activity and service when something needs to be changed, not to mention debugging)
Thanks for help!
EDIT:
I think I found a way that you can send objects to/from activities to/from services
IF they are serializable ( see Intent.putExtra(String, Serializable) and Bundle.getSerializable(key) )
However whenever I try to do this with my own objects I get casting errors.
I give Intent.putExtra(String, Serializable) my object of some class
Bundle.getSerializable(key) works (or at least it does not return null)
BUT
when I try to cast the object back to my class I get casting errors
and the object is not an instance of my class
I have user serialization before with files and sockets, and never had this problem.
Has anyone tried using this?


