
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
react-native-simple-contacts
Advanced tools
This library is a work in progress. Additional features will be added as they become required.
$ npm install react-native-simple-contacts --save
$ react-native link react-native-simple-contacts
import simpleContacts from 'react-native-simple-contacts';
// Get all contacts
simpleContacts.getContacts().then((contacts) => {
// Do something with the contacts
});
// Get a specific contact based on a phone number
simpleContacts.findContactByNumber(number).then((contact) => {
// Do something with the contact
});
// Get the user's profile
simpleContacts.getProfile().then((profile) => {
// Do something with the profile
});
Function | Description |
---|---|
getContacts() | Returns an array of contacts |
getProfile() | Return the user's profile. |
findContactByNumber(number) | Return the contact that matches the provided number. |
Simple contacts only returns the following fields:
Field | Description |
---|---|
key | A unique identifier |
name | The contact's display name |
avatar | The contact's photo if available |
number | The contacts phone number |
Returned contacts look like this:
const contact = {
"key": "contact_###",
"name": "John Doe",
"avatar": "uri://picture",
"number": "1-555-555-5555"
}
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-simple-contacts
and add BDVSimpleContacts.xcodeproj
libBDVSimpleContacts.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import ca.bigdata.voice.contacts.BDVSimpleContactsPackage;
to the imports at the top of the filenew BDVSimpleContactsPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-simple-contacts'
project(':react-native-simple-contacts').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-simple-contacts/android')
android/app/build.gradle
:
compile project(':react-native-simple-contacts')
FAQs
Simple access to contacts for iOS and Android
The npm package react-native-simple-contacts receives a total of 39 weekly downloads. As such, react-native-simple-contacts popularity was classified as not popular.
We found that react-native-simple-contacts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.