Code example for AsyncQueryHandler

Methods: postDelayed, cancelOperation

0
            } 
        }, 10); 
    } 
     
    public static void startQueryForInboxView(AsyncQueryHandler handler, int token,int mPostTime) {
        handler.cancelOperation(token);
        final int queryToken = token;
        final AsyncQueryHandler queryHandler = handler;
        final int postTime = mPostTime;
        Log.d(TAG,"startQueryForInboxView");
        queryHandler.postDelayed(new Runnable() {
            public void run() { 
                queryHandler.startQuery(
                        queryToken, null, INBOXFOLDER_URI,
                        null, null, null, Conversations.DEFAULT_SORT_ORDER); 
            } 
        }, postTime);
    } 
 
    private static void markFailedSmsSeen(Context context) {
        ContentValues values = new ContentValues(1);