All Projects → wix → React Native Paged Contacts

wix / React Native Paged Contacts

Licence: mit
Paged contacts for React Native

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to React Native Paged Contacts

Simple Contacts
Easy and quick contact management with no ads, handles groups and favorites too.
Stars: ✭ 346 (+337.97%)
Mutual labels:  contacts
Phonetic
An iOS App to generate phonetic keys for your Chinese contacts. Written in Swift.
Stars: ✭ 574 (+626.58%)
Mutual labels:  contacts
Q Municate Services Ios
Easy-to-use services for Quickblox SDK, for speeding up development of iOS chat applications
Stars: ✭ 30 (-62.03%)
Mutual labels:  contacts
Flutter wechat
🔥🔥🔥 利用 Flutter 来高仿微信(WeChat) 7.0.0+ App,代码规范惊为天人、注释详解令人发指、细节处理精益求精、核心功能配备文档、接近98%还原度的原生App视觉体验。代码不多,注释多。(持续更新,敬请期待,欢迎Star和Fork…)
Stars: ✭ 421 (+432.91%)
Mutual labels:  contacts
Easyrecyclerviewsidebar
🔍 Easy sidebar for Android RecyclerView (。>﹏<。)
Stars: ✭ 509 (+544.3%)
Mutual labels:  contacts
Chips Input Layout
A customizable Android ViewGroup for displaying Chips (specified in the Material Design Guide).
Stars: ✭ 591 (+648.1%)
Mutual labels:  contacts
address
Adressverwaltung inkl. Koordinaten (via Google Maps) im Backend
Stars: ✭ 25 (-68.35%)
Mutual labels:  contacts
Yetiforcecrm
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
Stars: ✭ 1,056 (+1236.71%)
Mutual labels:  contacts
Outlookcaldavsynchronizer
Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
Stars: ✭ 560 (+608.86%)
Mutual labels:  contacts
Vdirsyncer
📇 Synchronize calendars and contacts.
Stars: ✭ 872 (+1003.8%)
Mutual labels:  contacts
Android Multipicker Library
Android Multipicker Library
Stars: ✭ 425 (+437.97%)
Mutual labels:  contacts
Fake contacts
Create fake phone contacts, to do data-poisoning.
Stars: ✭ 459 (+481.01%)
Mutual labels:  contacts
Azlistview
A Flutter sticky headers & index ListView. Flutter 城市列表、联系人列表,索引&悬停。
Stars: ✭ 632 (+700%)
Mutual labels:  contacts
Contacts
📇 Contacts app for Nextcloud
Stars: ✭ 400 (+406.33%)
Mutual labels:  contacts
Flutter Contacts Plugin
Contact plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to read, create and update contacts from the address book.
Stars: ✭ 38 (-51.9%)
Mutual labels:  contacts
Decsync
Synchronize RSS, contacts, calendars, tasks and more without a server
Stars: ✭ 257 (+225.32%)
Mutual labels:  contacts
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+6567.09%)
Mutual labels:  contacts
Templates Using Bootstrap4
🌆 Here I've aggregated some of the most commonly used web-page templates made using Bootstrap4 🛒
Stars: ✭ 60 (-24.05%)
Mutual labels:  contacts
Whatsup
**Deprecated** Real time chat app written in Swift 4 using Firebase and OTP Authentication
Stars: ✭ 39 (-50.63%)
Mutual labels:  contacts
Wechat
🔥 iOS 利用MVVM + RAC + ViewModel-Based Navigation来搭建微信(WeChat 7.0.0+)的整体基本架构,以及实现微信朋友圈、通讯录、下拉小程序、搜索等主要功能,代码规范惊为天人、注释详解令人发指、细节处理精益求精、核心功能配备文档、接近98%还原度的原生App视觉体验,代码不多,注释多。(持续更新,敬请期待,欢迎Star和Fork…)
Stars: ✭ 870 (+1001.27%)
Mutual labels:  contacts

React Native Paged Contacts

Paged contacts manager for React Native.

Currently, only fetching contacts is supported.

Installation

iOS

  • Add RCTPagedContacts.xcodeproj to your project.
  • In you project's target, under Build PhasesTarget Dependencies, add RCTPagedContacts.
  • In you project's target, under Build PhasesLink Libraries With Libraries, add RCTPagedContacts.
  • Add NSContactsUsageDescription privacy key description to Info.plist

Android

  • Add the following to settings.gradle:

     include ':pagedcontacts'
     project(':pagedcontacts').projectDir = new File(
             rootProject.projectDir, '../node_modules/react-native-paged-contacts/android/')
    
  • Update dependencies in build.gradle.

     dependencies {
         compile fileTree(dir: 'libs', include: ['*.jar'])
         compile project(':pagedcontacts')  // <— Add this
         ...
     }
    

(The dependency will be satisfied after npm install on the Example project)

  • Add the package PagedContactsPackage, to MainApplication.java

         import com.wix.pagedcontacts.PagedContactsPackage; // <- Add this
    
         @Override
         protected List<ReactPackage> getPackages() {
         	return Arrays.<ReactPackage>asList(
         		new MainReactPackage(),
         		new PagedContactsPackage() // <- Add this
         	);
         }
    
  • FYI: The READ_CONTACTS permission will automatically be merged into your build's AndroidManifest.xml

     <uses-permission android:name="android.permission.READ_CONTACTS" />
    
  • The WRITE_CONTACTS permission is needed to use addContact method. and should be added to your build's AndroidManifest.xml

     <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    

API

  • new PagedContacts() — Create a paged contacts manager for all device contacts.
  • new PagedContacts(nameMatch) — Create a paged contacts manager for contacts matching the provided name.
  • getAuthorizationStatus() — Returns the current authorization status to access the contact data.
  • requestAccess() — Request contacts access from the operating system. This must be called before calling other APIs.
  • setNameMatch(matchName) — Change the result set to filter contacts by matching name. Set to null to receive all contacts.
  • getContactsCount() — Get the count of the current contacts set.
  • getContactsWithRange(offset, batchSize, keysToFetch) — Get contacts within the requested batchSize, starting from offset. Only the keys requested in keysToFetch will be provided (contact identifiers are always provided).
  • getContactsWithIdentifiers(identifiers, keysToFetch) — Get contacts with the provided identifiers. Only the keys requested in keysToFetch will be provided (contact identifiers are always provided).
  • addContact(contact) - Add a contact to the device. Fields that can be set are the same as the keys described below. [1]
  • dispose() — Disposes the native components. Call this method when the manager object is no longer required. Must not call any other methods of the contacts manager after calling dispose.

Authorization Status

  • PagedContacts.notDetermined — The user has not yet made a choice regarding whether the application may access contact data.
  • PagedContacts.authorized — The application is authorized to access contact data.
  • PagedContacts.denied — The user explicitly denied access to contact data for the application.
  • PagedContacts.restricted — The application is not authorized to access contact data. The user cannot change this application’s status, possibly due to active restrictions such as parental controls being in place.

Available Keys to Fetch

  • PagedContacts.identifier — The contact’s unique identifier.
  • PagedContacts.displayName
  • PagedContacts.namePrefix — Name prefix.
  • PagedContacts.givenName — Given name.
  • PagedContacts.middleName — Middle name.
  • PagedContacts.familyName — Family prefix.
  • PagedContacts.previousFamilyName — Previous family name. (iOS only)
  • PagedContacts.nameSuffix — Name suffix.
  • PagedContacts.nickname — Nickname.
  • PagedContacts.organizationName — Organization name.
  • PagedContacts.departmentName — Department name.
  • PagedContacts.jobTitle — Job title.
  • PagedContacts.phoneticGivenName — Phonetic given name.
  • PagedContacts.phoneticMiddleName — Phonetic middle name.
  • PagedContacts.phoneticFamilyName — Phonetic family name.
  • PagedContacts.phoneticOrganizationName — Phonetic organization name.
  • PagedContacts.birthday — Birthday.
  • PagedContacts.nonGregorianBirthday — Non-Gregorian birthday. (iOS only)
  • PagedContacts.note — Note.
  • PagedContacts.imageData — Image data.
  • PagedContacts.thumbnailImageData — Thumbnail data.
  • PagedContacts.phoneNumbers — Phone numbers.
  • PagedContacts.emailAddresses — Email addresses.
  • PagedContacts.postalAddresses — Postal addresses.
  • PagedContacts.dates — Contact dates.
  • PagedContacts.urlAddresses — URL addresses.
  • PagedContacts.relations — Contact relations.
  • PagedContacts.socialProfiles — Social profiles. (iOS only)
  • PagedContacts.instantMessageAddresses — Instant message addresses.

Usage

Import the library and create a new PagedContacts instance.

import {PagedContacts} from 'react-native-paged-contacts';
let pg = new PagedContacts();

First request authorization, and, if granted, request the contacts. (iOS only)

pg.requestAccess().then((granted) => {
  if(granted !== true)
  {
    return; 
  }

  pg.getContactsCount().then( (count) => {
    pg.getContactsWithRange(0, count, [PagedContacts.displayName, PagedContacts.thumbnailImageData, PagedContacts.phoneNumbers, PagedContacts.emailAddresses]).then((contacts) => {
      //Use contacts here
    });
  });
});

This is a very intensive way of obtaining specific keys of all contacts. Instead, use the paging mechanism to obtain contacts within a range, and only request keys you need.

Example of a Contact Result

{
  "familyName": "Zakroff",
  "nonGregorianBirthday": "1961-12-25T22:00:00.000Z",
  "birthday": "1961-12-26T00:00:00.000Z",
  "contactRelations": [
    {
      "label": "sister",
      "value": "Kate Bell"
    }
  ],
  "nickname": "Hanky Panky",
  "displayName": "Prof. Hank M. Zakroff Esq.",
  "organizationName": "Financial Services Inc.",
  "departmentName": "Legal",
  "namePrefix": "Prof.",
  "nameSuffix": "Esq.",
  "socialProfiles": [
    {
      "label": "twitter",
      "value": {
        "urlString": "http:\/\/twitter.com\/HankyPanky",
        "username": "HankyPanky",
        "service": "Twitter"
      }
    },
    {
      "label": "facebook",
      "value": {
        "urlString": "http:\/\/www.facebook.com\/HankZakoff",
        "username": "HankZakoff",
        "service": "Facebook"
      }
    }
  ],
  "dates": [
    {
      "label": "anniversary",
      "value": "0001-12-01T00:00:00.000Z"
    },
    {
      "label": "other",
      "value": "2014-09-25T00:00:00.000Z"
    }
  ],
  "phoneNumbers": [
    {
      "label": "work",
      "value": "(555) 766-4823"
    },
    {
      "label": "other",
      "value": "(707) 555-1854"
    }
  ],
  "identifier": "60CB0169-0747-4494-9F10-22F387226676",
  "urlAddresses": [
    {
      "label": "homepage",
      "value": "https:\/\/google.com"
    }
  ],
  "postalAddresses": [
    {
      "label": "work",
      "value": {
        "ISOCountryCode": "us",
        "state": "CA",
        "street": "1741 Kearny Street",
        "city": "San Rafael",
        "country": "",
        "postalCode": "94901"
      }
    },
    {
      "label": "home",
      "value": {
        "ISOCountryCode": "il",
        "state": "",
        "street": "151 Jerusalem Avenue",
        "city": "Tel Aviv - Jaffa",
        "country": "Israel",
        "postalCode": "68152"
      }
    }
  ],
  "middleName": "M.",
  "jobTitle": "Partner",
  "note": "Best lawyer ever!",
  "emailAddresses": [
    {
      "label": "work",
      "value": "[email protected]"
    }
  ],
  "givenName": "Hank",
  "instantMessageAddresses": [
    {
      "label": "Facebook",
      "value": {
        "service": "Facebook",
        "username": "HankZakoff"
      }
    },
    {
      "label": "Skype",
      "value": {
        "service": "Skype",
        "username": "HZakoff"
      }
    }
  ]
}

1 : Contact's image can be set using an extra imageUrl field (iOS only)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].