Contacts plugin
This plugins allows you to get all contacts on iOS and Android
Platforms:
iOS (and simulator) and AndroidFunctions:
contacts.canAccess()
--returns string
- "access granted" (both)
- "denied" (both) (cannot access contacts)
- "restricted" (iOS) (user won't allow access)
- "not determined" (iOS) (have not show user prompt)
contacts.requestAccess(listener)
listener(function)
event.status
- "access granted" (both)
- "denied" (both) (cannot access contacts)
- "access granted already" (both) (already have access)
- "access canceled"(iOS) (user hit cancel on prompt)
- "error"(iOS) (also returns event.error which is description)
- "restricted"(iOS) (user denied you premisson already)
contacts.get(listener)
listener(function)
event.status
- "success" (both)
- "denied" (both) (cannot access contacts)
- "error"(iOS) (also returns event.error which is description)
- "restricted"(iOS) (user denied you premisson already)
event.contacts -- only returned if event.status == "success"
- name (string)
- addresses (array of tables)
- street (string)
- city (string)
- state (string)
- postalCode (string)
- country (string)
- type (string)(android) is other either "home", "work", or "other"
- phoneNumbers (array of tables)
- number (string)
- type (string)"
- "mobile" (both)
- "other" (both)
- "work"(android)
- "home" (android)
- "main" (iOS)
- "iPhone" (iOS)
- "homeFax" (iOS)
- "workFax" (iOS)
- "otherFax" (iOS)
- "pager" (iOS)
- emailAddresses (array of tables)
- email (string)
- type (string)(android) is other either "home", "work", "mobile",or "other"
- "access granted already" (both) (already have access)
- "access canceled"(iOS) (user hit cancel on prompt)
- "error"(iOS)
- "restricted"(iOS) (user denied you premisson already)