0.0.2 • Published 2 years ago
capacitor-contacts
read, write, delete contacts
Install
npm install a-capacitor-contacts
npx cap sync
API
getContacts(...)
getContacts(options?: getContactsOpt | undefined) => Promise<{ results: any[]; }>
Param | Type |
---|
options | getContactsOpt |
Returns: Promise<{ results: any[]; }>
getContactByName(...)
getContactByName(options: getContactsByNameOpt) => Promise<{ results: any[]; }>
Param | Type |
---|
options | getContactsByNameOpt |
Returns: Promise<{ results: any[]; }>
addNewContact(...)
addNewContact(options: addNewContact) => Promise<{ results: any[]; }>
Param | Type |
---|
options | addNewContact |
Returns: Promise<{ results: any[]; }>
deleteContact(...)
deleteContact(options: contactUid) => Promise<{ results: any[]; }>
Param | Type |
---|
options | contactUid |
Returns: Promise<{ results: any[]; }>
Interfaces
getContactsOpt
Prop | Type | Description |
---|
getEmail | boolean | getEmail if pass true its also search saved email address along with mobile number |
getPhoto | boolean | return saved photo in base64 string |
getContactsByNameOpt
Prop | Type | Description |
---|
name | string | |
getEmail | boolean | getEmail if pass true its also search saved email address along with mobile number |
getPhoto | boolean | return saved photo in base64 string |
addNewContact
Prop | Type | Description |
---|
displayName | string | Display contact name |
mobileNumber | string | mobile number |
homeNumber | string | |
workNumber | string | |
emailID | string | |
company | string | |
jobTitle | string | |
contactUid