Native Contacts

To Retrive All contacts of device.

const { contacts } = window.WTN

contacts.getPermissionStatus({
  callback: function(data){
   //data.status contains permission status
  }
 })
 

contacts.getAll({
 callback: function(data){
  //data.contacts contains all contact   
 }
})

the possible status are

  • authorized: Permission has been granted

  • denied: Permission has been denied

  • restricted: access has been administratively prohibited

  • notDetermined: User has not yet been asked for permission

contacts will be an array of contacts with following keys

  • givenName

  • familyName

  • middleName

  • birthday

  • namePrefix

  • previousFamilyName

  • nameSuffix

  • nickname

  • organizationName

  • departmentName

  • jobTitle

  • phoneNumbers* (Array of Objects Described Below)

    • label

    • phoneNumber

  • emailAddresses* (Array of Objects Described Below)

    • label

    • emailAddress

  • postalAddresses* (Array of Objects Described Below)

    • label

    • street

    • subLocality

    • city

    • subAdministrativeArea

    • state

    • postalCode

    • country

    • isoCountryCode

Feature added in Android on 15/03/24

Last updated