react-native-contacts
Advanced tools
Comparing version 0.7.1 to 0.8.0
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "React Native Contacts (android & ios)", | ||
@@ -10,0 +10,0 @@ "nativePackage": true, |
@@ -18,13 +18,13 @@ # React Native Contacts | ||
## API | ||
`getAll` (callback) - returns *all* contacts as an array of objects | ||
`getAllWithoutPhotos` - same as `getAll` on Android, but on iOS it will not return uris for contact photos (because there's a significant overhead in creating the images) | ||
`getPhotoForId(contactId, callback)` - returns a URI (or null) for a contacts photo | ||
`addContact` (contact, callback) - adds a contact to the AddressBook. | ||
`updateContact` (contact, callback) - where contact is an object with a valid recordID | ||
`deleteContact` (contact, callback) - where contact is an object with a valid recordID | ||
`checkPermission` (callback) - checks permission to access Contacts | ||
`requestPermission` (callback) - request permission to access Contacts | ||
* `getAll` (callback) - returns *all* contacts as an array of objects | ||
* `getAllWithoutPhotos` - same as `getAll` on Android, but on iOS it will not return uris for contact photos (because there's a significant overhead in creating the images) | ||
* `getPhotoForId(contactId, callback)` - returns a URI (or null) for a contacts photo | ||
* `addContact` (contact, callback) - adds a contact to the AddressBook. | ||
* `updateContact` (contact, callback) - where contact is an object with a valid recordID | ||
* `deleteContact` (contact, callback) - where contact is an object with a valid recordID | ||
* `checkPermission` (callback) - checks permission to access Contacts | ||
* `requestPermission` (callback) - request permission to access Contacts | ||
## Usage | ||
@@ -178,3 +178,3 @@ `getAll` is a database intensive process, and can take a long time to complete depending on the size of the contacts list. Because of this, it is recommended you access the `getAll` method before it is needed, and cache the results for future use. | ||
``` | ||
If you are using an older version of RN (i.e. `MainApplication.java` does not contain this method (or doesn't exist) and MainActivity.java starts with `public class MainActivity extends Activity`) please see the [old instructions](https://github.com/rt2zz/react-native-contacts/tree/1ce4b876a416bc2ca3c53e7d7e0296f7fcb7ce40#android) | ||
If you are using a version of RN before [v0.21.0](https://github.com/facebook/react-native/releases/tag/v0.21.0) please see the [old instructions](https://github.com/rt2zz/react-native-contacts/tree/1ce4b876a416bc2ca3c53e7d7e0296f7fcb7ce40#android). | ||
@@ -181,0 +181,0 @@ * add Contacts permission (in android/app/src/main/AndroidManifest.xml) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
132608
18