title: content resolver notifyChange() not working
body: <p>I have setup a fragment to pull data from a custom content provider using a CursorLoader.</p>
  
  <p>The problem is that when i update a record in the SQLite table using the content resolver, the cursor does not refresh i.e. the <code>getContext().getContentResolver().notifyChange(myUri, null)</code> has no effect. I have to exit the fragment and open it again to see the change.</p>
  
  <p>I think the problem is that the URI i have used to update a row is not being observed by the loader :</p>
  
  <ul>
  <li>URI to create loader -<code>content://com.myapp.provider/MyTable/Set/22</code></li>
  <li>URI to update row -<code>content://com.myapp.provider/MyTable/167</code></li>
  </ul>
  
  <p>167 identifies a unique row in the table. 22 identifies a set of rows in the table. <em>Is there some way to tell the loader that the row 167 comes within the set 22, so it should reset the cursor?</em></p>
  
  <p>Here is the code in case it brings more clarity :</p>
  
  <p><strong>Creating CursorLoader in Fragment :</strong></p>
  
  <pre><code>@Override
  public Loader&lt;Cursor&gt; onCreateLoader(int arg0, Bundle queryBundle) {
      CursorLoader cursorLoader = new CursorLoader(getActivity(), Uri.parse("content://com.myapp.provider/MyTable/Set/22"), myProjection, null, null, null);
      return cursorLoader;
  }
  </code></pre>
  
  <p><strong>on button click in fragment :</strong></p>
  
  <pre><code>mContext.getContentResolver().update("content://com.myapp.provider/MyTable/167", values, null, null);
  </code></pre>
  
  <p><strong>Content Provider class :</strong></p>
  
  <pre><code>private static final String AUTHORITY = "com.myapp.provider";
  private static final String TABLE_PATH = "MyTable";
  public static final String CONTENT_URI_BASEPATH = "content://" + AUTHORITY + "/" + TABLE_PATH;
  
  private static final int URITYPE_TABLE = 1;
  private static final int URITYPE_SINGLE_SET = 2;
  private static final int URITYPE_SINGLE_ROW = 3;
  
  private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
  static{
      sUriMatcher.addURI(AUTHORITY, TABLE_PATH,URITYPE_TABLE);
      sUriMatcher.addURI(AUTHORITY, TABLE_PATH + "/Set/#", URITYPE_SINGLE_SET);
      sUriMatcher.addURI(AUTHORITY, TABLE_PATH + "/#", URITYPE_SINGLE_ROW);
      }
  
  @Override
  public int update(Uri myUri, ContentValues values, String selection, String[] selectionArgs){
      int rowCount = 0;
      String id;
      SQLiteDatabase db = localDB.getWritableDatabase();
      int uriType = sUriMatcher.match(myUri);
  
      switch(uriType){
      case URITYPE_SINGLE_ROW :
      id = uri.getLastPathSegment();
          //selection and selectionArgs are ignored since the URI itself identifies a unique row. 
          rowCount = db.update(MyTable.TABLE_NAME, values, MyTable.COLUMN_ID + " = ?", new String[] {id});
      }
  
      getContext().getContentResolver().notifyChange(myUri, null);
      return rowCount;
  }
  </code></pre>