Code example for AsyncQueryHandler

Methods: cancelOperation, startQuery

0
                null, null, Telephony.CbSms.DEFAULT_SORT_ORDER); 
    } 
     
    public static void startQueryForThreadId(AsyncQueryHandler handler,
            long thread_id, int token) {
        handler.cancelOperation(token);
        handler.startQuery(token, null, ContentUris
                .withAppendedId(sThreadMessageUri, thread_id),
                ALL_MESSAGE_PROJECTION, null, null, null);
    } 
 
    /** 
     * Start a delete of the CBMessages with the specified thread ID. 
     *  
     * @param handler 
     *            An AsyncQueryHandler that will receive onDeleteComplete upon 
     *            completion of the CBMessages being deleted 
     * @param token 
     *            The token that will be passed to onDeleteComplete 
     * @param deleteAll 
     *            Delete the whole thread including locked messages