capacitor-community / contacts

Contacts Plugin for Capacitor

Home Page:https://capacitor-community.github.io/contacts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property which is showing if user already granted contact permission

enes-get-local opened this issue · comments

@capacitor-community/contacts : "^1.0.9"
@capacitor/core: "^3.3.2",

I m using Contacts plugin to access user phone contacts. It needs to call Contacts.getPermissions() function to grant access. If user already granted this permission, i don't want to call getPermissions() function again.

Is there any variable which keep a state of current device if it already granted access ?

commented

A new major of this plugin just got released as a beta version. The plugin is refactored quite a bit. Among others, the API and TypeScript definitions got improved.

It also ships with improved checking and requesting of permissions: it now follows the new standards defined by the Capacitor team.

Check out the newly added docs here: https://capacitor-community.github.io/contacts

Mind you that the new version (v3 and v4) are currently still in beta. However, the beta is tested quite extensively and fairly stable. If you're willing to test it out in your project, it would be much appreciated!