Code example for AsyncQueryHandler

Methods: startQuery

0
        if (mContactUri != null) {
            final ContentResolver resolver = getContext().getContentResolver();
            final Uri lookupUri = TContacts.getLookupUri(resolver, mContactUri);
            trigger(lookupUri);
        } else if (mContactEmail != null) {
            mQueryHandler.startQuery(TOKEN_EMAIL_LOOKUP_AND_TRIGGER, mContactEmail,
                    Uri.withAppendedPath(TEmail.getLookupUri(), Uri.encode(mContactEmail)),
                    EMAIL_LOOKUP_PROJECTION, null, null, null);
        } else if (mContactPhone != null) {
            mQueryHandler.startQuery(TOKEN_PHONE_LOOKUP_AND_TRIGGER, mContactPhone,
                    Uri.withAppendedPath(TPhoneLookup.getFilterUri(), mContactPhone),
                    PHONE_LOOKUP_PROJECTION, null, null, null);
        } else { 
            // If a contact hasn't been assigned, don't react to click. 
            return; 
        } 
    } 
 
    /** 
     * Set a list of specific MIME-types to exclude and not display. For