Usage
Address Book allows access to contacts on mobile devices.
This feature allows you to read the contacts saved on the mobile devices. All Address Book features can be accessible from AddressBook static class.
Before using any of the plugin's features, you need to import the namespace.
After importing the namespace, AddressBook class is available for accessing all of the Address Book's features.
Get Contacts Access Status
Get the contacts access status to see if it's allowed to access or denied by the user. GetContactAccessStatus method returns AddressBookContactsAccessStatus to identify if the status is NotDetermined/Restricted/Denied/Authorized.
Read Contacts
Fetch the contacts available for the user by calling ReadContacts method.
This method automatically handles the permission on first call. If user denies the permission, corresponding error with error code is returned in the callback.
ReadContacts take ReadContactsOptions where you can configure on the what and how to fetch. It provides the following options
Limit - How many contacts to fetch from the provided offset
Offset - Offset from which contacts need to be read
Constraints - If you want to fetch contacts only with name or email or phone number or any combination of those
Along with options, you need to pass a callback to get the list of IAddressBookContact instances.
Last updated