Code example for AsyncQueryHandler

Methods: startQuery

0
 
        Uri search = Uri.parse("content://media/external/audio/search/fancy/" + Uri.encode(filter));
 
        Cursor ret = null;
        if (async != null) {
            async.startQuery(0, null, search, ccols, null, null, null);
        } else { 
            ret = MusicUtils.query(this, search, ccols, null, null, null);
        } 
        return ret;
    } 
 
    static class QueryListAdapter extends SimpleCursorAdapter {
        private QueryBrowserActivity mActivity = null;
 
        private final AsyncQueryHandler mQueryHandler;
 
        private String mConstraint = null;
 
        private boolean mConstraintIsValid = false;