title: Communicate to a service from an activity in android
body: <p>I need to communicate between activity and service. I have a service that is running in background. </p>
  
  <ul>
  <li>When activity starts it will check the service is running or not. </li>
  <li>If not running then activity will start the service.</li>
  <li>If already running then activity will request service for some data.</li>
  </ul>
  
  <p>I need to get update data from service when I want just like polling method. Actually after certain period I need data from service. </p>
  
  <p>How I can get data from service? </p>
  
  <p>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.  </p>