Capacitor plugin to get and modify mobile contacts
npm install @anuradev/capacitor-contacts
npx cap synccheckPermissions()requestPermissions()getContacts()createContact(...)addToExistingContact(...)deleteContact(...)getGroups()getContactGroups()- Interfaces
- Type Aliases
checkPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
requestPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
getContacts() => Promise<{ contacts: Contact[]; }>Returns: Promise<{ contacts: Contact[]; }>
createContact(data: { name?: string; number: string; }) => Promise<void>| Param | Type |
|---|---|
data |
{ name?: string; number: string; } |
addToExistingContact(data: { name?: string; number: string; }) => Promise<void>| Param | Type |
|---|---|
data |
{ name?: string; number: string; } |
deleteContact(data: { contactId: string; }) => Promise<void>| Param | Type |
|---|---|
data |
{ contactId: string; } |
getGroups() => Promise<{ groups: Group[]; }>Returns: Promise<{ groups: Group[]; }>
getContactGroups() => Promise<{ [key: string]: Group[]; }>Returns: Promise<{ [key: string]: Group[]; }>
| Prop | Type |
|---|---|
display |
PermissionState |
| Prop | Type |
|---|---|
contactId |
string |
displayName |
string |
phoneNumbers |
PhoneNumber[] |
emails |
EmailAddress[] |
photoThumbnail |
string |
organizationName |
string |
organizationRole |
string |
birthday |
string |
| Prop | Type |
|---|---|
label |
string |
number |
string |
| Prop | Type |
|---|---|
label |
string |
address |
string |
| Prop | Type |
|---|---|
groupId |
string |
accountType |
string |
accountName |
string |
title |
string |
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'