Launches the native contacts app for the user to select a contact.
$m.pickContact(function(response){ if(response.code){ var contacts = response.result; } else{ $m.toast(response.error.message); } }); |
Syntax
$m.pickContact(fp_callback)
Parameters
fp_callback
function (optional)
Function that invokes when the pick operation is completed. The function receives a response object as parameter with the following properties,
- code - {Number}. 1 indicates that the pick operation is successful. 0 indicates a failure.
- result - {Array}. Array of contact objects picked by the user.
- error - {Object}. Available when the code is 0. The error object contains,
- message - {String}. A short description of the error.
- description - {String}. A detailed description of the error.