Documentation Index
Fetch the complete documentation index at: https://setup.despia.com/llms.txt
Use this file to discover all available pages before exploring further.
Lovable Prompt
Add native contact access functionality to retrieve users’ device contacts including names and phone numbers using the Despia SDK from: https://www.npmjs.com/package/despia-nativeFirst, install the package: Please follow the installation instructions for the “despia-native” npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
npm install despia-nativeThen import it: import despia from 'despia-native'- Request contact permission using
despia("requestcontactpermission://") - Read contacts using
await despia('readcontacts://', ['contacts'])which returns a JSON object with contact names as keys and phone number arrays as values - When accessing the data, use “dot notation” like
.contactsto retrieve the contact data in a JSON object format. Here is an example of the structure returned:
This feature requires native capabilities which will be fully provided by the “despia-native” npm package, no additional native libraries are needed!
Installation
Install the Despia package from NPM:Usage
1. Import the SDK
2. Request Permission and Read Contacts
Access Native Device Contacts and process them:Resources
- NPM Package
- View full NPM documentation for additional configuration options