mobile.chooseContact
Lets the user choose a contact from the mobile device contact list and returns the vCard.
Syntax
ui.Interface.frontCall("mobile", "chooseContact",
[], [result])
- result - The vCard string from the device's contacts database.
Usage
The "chooseContact
" front call opens the mobile device contact
chooser, allows the user to select a contact and returns the contact as a vCard string.
For GMA / Android™,
using the chooseContact
front call needs the android.permission.READ_CONTACTS
Dangerous Permission to be specified when building the APK. See
Android permissions for more
details. On Android 5.1 and lower
(< API 23), use the android.permission.GET_ACCOUNTS
permission.
If the user cancels the contact chooser, NULL
is returned.
On Safari iOS, the chooseContact
front call needs to be explicitly enabled in
Safari Settings → Advanced → Experimental Features → Toggle Contact Picker
API
The chooseContact
front call returns a VCARD version 4, were the first name and
last name fields are optional.
Example
DEFINE vcard STRING
CALL ui.Interface.frontCall("mobile", "chooseContact", [], [vcard] )