Android Two-way Service Communication
I have an activity and a local bound service. I've got the bound service up and running fine, so I can handle communication from the client to the server, through functions on the
Solution 1:
- You can use BroadCasts to send info from service to Activity.
- Every call of
startService()
inside Activity class will just call onStartCommand() method of service class, so you can send message to it inside Intent. - Use Service binding to make your own info transfer.
Post a Comment for "Android Two-way Service Communication"