I need to communicate between activity and service. I have a service that is running in background.
- When activity starts it will check the service is running or not.
- If not running then activity will start the service.
- If already running then activity will request service for some data.
I need to get update data from service when I want just like polling method. Actually after certain period I need data from service.
How I can get data from service?
As far as I know it can be done by binding service. But I don't want to bind the service because I need to run the service when activity isn't on focus.