Cursor setNotificationUri - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Cursor setNotificationUri method.

This code example shows how to use the following methods:close, getCount, getString, moveToFirst, setNotificationUri
 
        SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
        qb.setTables(args.table);
 
        Cursor ret = qb.query(db, select, args.where, args.args, null, null, sort);
        ret.setNotificationUri(getContext().getContentResolver(), url);
        return ret;
    } 
 
    @Override 
    public String getType(Uri url) {
        // If SqlArguments supplies a where clause, then it must be an item 
        // (because we aren't supplying our own where clause). 
        SqlArguments args = new SqlArguments(url, null, null);
        if (TextUtils.isEmpty(args.where)) {
            return "vnd.android.cursor.dir/" + args.table;
        } else { 
            return "vnd.android.cursor.item/" + args.table;
        } 
    } 

7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
  protected void notifyConversationListListeners() { 
    context.getContentResolver().notifyChange(Uri.parse(CONVERSATION_LIST_URI), null);
  } 
 
  protected void setNotifyConverationListeners(Cursor cursor, long threadId) {
    cursor.setNotificationUri(context.getContentResolver(), Uri.parse(CONVERSATION_URI + threadId));
  } 
 
  protected void setNotifyConverationListListeners(Cursor cursor) {
    cursor.setNotificationUri(context.getContentResolver(), Uri.parse(CONVERSATION_LIST_URI));
  } 
 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,
                 selectionArgs, null, null, orderBy);
 
    c.setNotificationUri(getContext().getContentResolver(), url);
 
    return(c);
  } 
 
  @Override 
  public String getType(Uri url) {
    if (isCollectionUri(url)) {
      return("vnd.commonsware.cursor.dir/constant"); 
    } 
 
    return("vnd.commonsware.cursor.item/constant"); 
  } 
 
  @Override 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,
                 selectionArgs, null, null, orderBy);
 
    c.setNotificationUri(getContext().getContentResolver(), url);
 
    return(c);
  } 
 
  @Override 
  public String getType(Uri url) {
    if (isCollectionUri(url)) {
      return("vnd.commonsware.cursor.dir/constant"); 
    } 
 
    return("vnd.commonsware.cursor.item/constant"); 
  } 
 
  @Override 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,
                 selectionArgs, null, null, orderBy);
 
    c.setNotificationUri(getContext().getContentResolver(), url);
 
    return(c);
  } 
 
  @Override 
  public String getType(Uri url) {
    if (isCollectionUri(url)) {
      return("vnd.commonsware.cursor.dir/constant"); 
    } 
 
    return("vnd.commonsware.cursor.item/constant"); 
  } 
 
  @Override 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
 
    Cursor c=
        qb.query(db.getReadableDatabase(key), projection, selection,
                 selectionArgs, null, null, orderBy);
 
    c.setNotificationUri(getContext().getContentResolver(), url);
 
    return(c);
  } 
 
  @Override 
  public String getType(Uri url) {
    if (isCollectionUri(url)) {
      return("vnd.commonsware.cursor.dir/constant"); 
    } 
 
    return("vnd.commonsware.cursor.item/constant"); 
  } 
 
  @Override 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
    wrappedCursor.unregisterDataSetObserver(dataSetObserver);
  } 
 
  @Implementation 
  public void setNotificationUri(ContentResolver contentResolver, Uri uri) {
    wrappedCursor.setNotificationUri(contentResolver, uri);
  } 
 
  @Implementation 
  public boolean getWantsAllOnMoveCalls() { 
    return wrappedCursor.getWantsAllOnMoveCalls();
  } 
 
  @Implementation 
  public Bundle getExtras() {
    return wrappedCursor.getExtras();
  } 
 
  @Implementation 
  public Bundle respond(Bundle bundle) {
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
        wrappedCursor.unregisterDataSetObserver(dataSetObserver);
    } 
 
    @Implementation 
    public void setNotificationUri(ContentResolver contentResolver, Uri uri) {
        wrappedCursor.setNotificationUri(contentResolver, uri);
    } 
 
    @Implementation 
    public boolean getWantsAllOnMoveCalls() { 
        return wrappedCursor.getWantsAllOnMoveCalls();
    } 
 
    @Implementation 
    public Bundle getExtras() {
        return wrappedCursor.getExtras();
    } 
 
    @Implementation 
    public Bundle respond(Bundle bundle) {
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
        } 
 
        SQLiteDatabase db = getDatabase();
        Cursor cursor = queryBuilder.query(db, projection, selection,
                selectionArgs, null, null, sortOrder);
        cursor.setNotificationUri(getContext().getContentResolver(), uri);
 
        return cursor;
    } 
     
    @Override 
    public final String getType(Uri uri) {
        switch (sURIMatcher.match(uri)) {
        case SIMPLEENTITY_DIR:
            return CONTENT_TYPE;
        case SIMPLEENTITY_ID:
            return CONTENT_ITEM_TYPE;
        default : 
            throw new IllegalArgumentException("Unsupported URI: " + uri);
        } 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setNotificationUri
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,
                 selectionArgs, null, null, orderBy);
 
    c.setNotificationUri(getContext().getContentResolver(), url);
 
    return(c);
  } 
 
  @Override 
  public String getType(Uri url) {
    if (isCollectionUri(url)) {
      return("vnd.commonsware.cursor.dir/constant"); 
    } 
 
    return("vnd.commonsware.cursor.item/constant"); 
  } 
 
  @Override 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Cursor setNotificationUri Questions & Answers:

setNotificationUri Method Overview
Register to watch a content URI for changes.
See Code Examples for other Android Cursor Methods: