Guide
Tutorial on Contacts
Using @capgo/capacitor-contacts
Capacitor Contacts Plugin interface for managing device contacts.
Install
bun add @capgo/capacitor-contacts
bunx cap sync
What This Plugin Exposes
countContacts- Count the total number of contacts on the device.createContact- Create a new contact programmatically.createGroup- Create a new contact group.deleteContactById- Delete a contact by ID.
Example Usage
countContacts
Count the total number of contacts on the device.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.countContacts();
createContact
Create a new contact programmatically.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.createContact({} as CreateContactOptions);
createGroup
Create a new contact group.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.createGroup({} as CreateGroupOptions);
deleteContactById
Delete a contact by ID.
import { CapacitorContacts } from '@capgo/capacitor-contacts';
await CapacitorContacts.deleteContactById({} as DeleteContactByIdOptions);
Full Reference
- GitHub: https://github.com/Cap-go/capacitor-contacts/
- Docs: /docs/plugins/contacts/
Keep going from Using @capgo/capacitor-contacts
If you are using Using @capgo/capacitor-contacts to plan dashboard and API operations, connect it with @capgo/capacitor-contacts for the implementation detail in @capgo/capacitor-contacts, Getting Started for the implementation detail in Getting Started, API Overview for the implementation detail in API Overview, Introduction for the implementation detail in Introduction, and API Keys for the implementation detail in API Keys.