Parameters
Success Callback
Error Codes
Code Example
Related APIs
my.addPhoneContact
Add a phone contact
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Select a contact from the phone’s contact list.
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback with contact data |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| name | String | Contact name |
| mobile | String | Contact phone number |
| Error Code | Description |
|---|---|
| 10 | No permission. |
| 11 | The user cancels the operation (or the device does not authorize use of the directory). |
my.choosePhoneContact({
success: (res) => {
console.log('Name:', res.name);
console.log('Phone:', res.mobile);
}
});