Issue
I simply want to call methods of a local service from my activity. How can I do that ?
Solution
One way to do this is by defining an interface with Android's AIDL and making use of the Binder
subsystem to perform IPC. There is a great set of instructions at the link I posted. I'd start there and then post here if you have questions. Despite being a pretty complex topic (IPC) Android and the Binder
do a really good job of making it pretty dead simple (at least to get started, I'm sure you could make it complicated if you wanted to ;-) )
Edit As pointed out in the comments, this is unnecessary if the Service
and the client are running in the same process. Unless you specify otherwise, this is the default. However, it still works regardless, it just adds a bit more complexity.
Answered By - Chris Thompson