Created
November 19, 2020 22:24
-
-
Save ShanikaNishadhi/5798f048f6ff033979bb0a54acadd0aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PermissionsAndroid } from 'react-native'; | |
import Contacts from 'react-native-contacts'; | |
PermissionsAndroid.request( | |
PermissionsAndroid.PERMISSIONS.READ_CONTACTS, | |
{ | |
'title': 'Contacts', | |
'message': 'Let us us access your contacts', | |
'buttonPositive': 'Please accept' | |
} | |
) | |
.then(Contacts.getAll) | |
.then(contacts => { | |
... | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment