pickContact

Contacts

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,

  1. code - {Number}. 1 indicates that the pick operation is successful. 0 indicates a failure.
  2. result - {Array}. Array of contact objects picked by the user.
  3. error - {Object}. Available when the code is 0. The error object contains,
  1. message - {String}. A short description of the error.
  2. description - {String}. A detailed description of the error.