title: Start IntentService from Activity and refresh Activity when IntentService is finished
body: <p>In my Android application, I have a simple list view with adapter. There's a heavy query which is to fill the list view with data. So I put it to an IntentService that runs in another thread.</p>
  
  <p>The IntentService is normally running separately, on its own, just to query some data and insert it into the SQLite database.</p>
  
  <p>But now I would like to have the following possibility:</p>
  
  <ol>
  <li>The activity starts the IntentService with startService().</li>
  <li>The IntentService does its heavy work.</li>
  <li>When the IntentService is finished, it should inform the activity about the result so that the activity can be refreshed to show the new data.</li>
  </ol>
  
  <p>Is this possible? I read a lot of questions here on Stack Overflow on this topic. But in every question, there was another solution. So I want to ask you all: Which solution is the best for my purpose?</p>
  
  <ul>
  <li>Binding the IntentService to the Activity does not seem to be the best solution as there might be conflicts with configuration changes of the activity etc. Correct?</li>
  <li><a href="http://mindtherobot.com/blog/37/android-architecture-tutorial-developing-an-app-with-a-background-service-using-ipc/" rel="noreferrer">This blog post</a> suggests using AIDL with Parcelables - which sounds very complex to me. There is an easier way, isn't it?</li>
  <li>One could set up a broadcast receiver in the activity and fire this broadcast in the IntentService when it is finished.</li>
  <li>Some people say you should <a href="https://stackoverflow.com/questions/4111398/android-notify-activity-from-service">use createPendingResult() to pass a PendingIntent</a> to the IntentService. If the IntentService finds that PendingIntent in its extras, it uses this to trigger off onActivityResult() in the Activity. Is this the way to choose?</li>
  </ul>