res/middleware/cordova/3.4.0/android/plugins/org.apache.cordova.contacts/www/contacts.js
function(fields, successCB, errorCB, options) {
        argscheck.checkArgs('afFO', 'contacts.find', arguments);
        if (!fields.length) {
            errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
        } else {
            var win = function(result) {
                var cs = [];
                for (var i = 0, l = result.length; i < l; i++) {
                    cs.push(contacts.create(result[i]));
                }
                successCB(cs);
            };
            exec(win, errorCB, "Contacts", "search", [fields, options]);
        }
    }
function(fields, successCB, errorCB, options) {
        argscheck.checkArgs('afFO', 'contacts.find', arguments);
        if (!fields.length) {
            errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
        } else {
            var win = function(result) {
                var cs = [];
                for (var i = 0, l = result.length; i < l; i++) {
                    cs.push(contacts.create(result[i]));
                }
                successCB(cs);
            };
            exec(win, errorCB, "Contacts", "search", [fields, options]);
        }
    }
function ( fields , successCB , errorCB , options ) { argscheck . checkArgs ( 'afFO' , 'contacts.find' , arguments ) ; if ( ! fields . length ) { errorCB && errorCB ( new ContactError ( ContactError . INVALID_ARGUMENT_ERROR ) ) ; } else { var win = function ( result ) { var cs = [ ] ; for ( var i = 0 , l = result . length ; i < l ; i ++ ) { cs . push ( contacts . create ( result [ i ] ) ) ; } successCB ( cs ) ; } ; exec ( win , errorCB , "Contacts" , "search" , [ fields , options ] ) ; } }
Returns an array of Contacts matching the search criteria.
@param fields that should be searched
@param successCB success callback
@param errorCB error callback
@param {ContactFindOptions} options that can be applied to contact searching
@return array of Contacts matching search criteria
Returns an array of Contacts matching the search criteria .