title: How do CursorLoader automatically updates the view even if the app is inactive?
body: <p>I have been working on a small To-Do list app. I used CursorLoader to update the ToDolistview from a content provider. I have a written a function <code>onNewItemAdded()</code>, which is called when user enters a new item in the text view and clicks enter. Refer below:</p>
  
  <pre><code>public void onNewItemAdded(String newItem) {
      ContentResolver cr = getContentResolver();
  
      ContentValues values = new ContentValues();
      values.put(ToDoContentProvider.KEY_TASK, newItem);
  
      cr.insert(ToDoContentProvider.CONTENT_URI, values);
      // getLoaderManager().restartLoader(0, null, this); // commented for the sake of testing
  }
  
  @Override
  protected void onResume() {
      super.onResume();
      //getLoaderManager().restartLoader(0, null, this); // commented for the sake of testing
  }
  
  public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
  
      CursorLoader loader = new CursorLoader(this,
              ToDoContentProvider.CONTENT_URI, null, null, null, null);
      Log.e("GOPAL", "In the onCreateLoader");
      return loader;
  }
  
  public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor cursor) {
  
      int keyTaskIndex = cursor.getColumnIndexOrThrow(ToDoContentProvider.KEY_TASK);
      Log.e("GOPAL", "In the onLoadFinished");
      todoItems.clear();
      if (cursor.moveToNext() == false) Log.e("GOPAL", "Empty Cursor");
      else {
          while (cursor.moveToNext()) {
              ToDoItem newItem = new ToDoItem(cursor.getString(keyTaskIndex));
              todoItems.add(newItem);
          }
          aa.notifyDataSetChanged(); // aa is arrayadapter used for the listview
      }
  }
  </code></pre>
  
  <p>I have read, CursorLoader automatically updates the view, whenever there is a data change in the content provider db. That means I suppose, <code>getLoaderManager().restartLoader(0, null, this)</code> has to be called implicitly whenever there is a change in data, right? 
            But that is not happening. Whenever I add a new item (the item is added to the db from <code>onNewItemAdded</code>, but restartLoader is not explicitly called), pause this activity and resume it back. I don't see any implicit call to restartLoader(even though db is changed) and the listview also is not updated with new item added. Why is that? How does a <code>CursorLoader</code> automatically updates the view even if app is not active???
  Thanks :)</p>
  
  <p>EDIT: I have also used <code>getContext().getContentResolver().notifyChange(insertedId, null)</code> in insert of my content provider.</p>