react-native-contacts-android
receiving contact from the phonebook
Install
- npm install react-native-contacts-android --save
- In
android/setting.gradle
... include ':react-native-contacts-android' project(':react-native-contacts-android').projectDir = new File(settingsDir, '../node_modules/react-native-contacts-android')
- In
android/app/build.gradle
...dependencies { ... compile project(':react-native-contacts-android')}
- register module (in android/app/src/main/java/[your-app-namespace]/MainActivity.java)
// <------ add import
- add Contacts permission (in android/app/src/main/AndroidManifest.xml)
... ...
Usage Example
; SelectContacts
Contact
"id": "2" "phones": "id": "50" "number": "12344234"