Comments (6)
looks like the starred option is never unpacked on android
import android.provider.ContactsContract.ContactOptionsColumns
@ReactMethod
public void addContact(ReadableMap contact, Promise promise) {
if (contact == null) {
promise.reject("New contact cannot be null.");
return;
}
String givenName = contact.hasKey("givenName") ? contact.getString("givenName") : null;
String middleName = contact.hasKey("middleName") ? contact.getString("middleName") : null;
String familyName = contact.hasKey("familyName") ? contact.getString("familyName") : null;
String prefix = contact.hasKey("prefix") ? contact.getString("prefix") : null;
...
from react-native-contacts.
Hello! I might have a similar issue to address here. I noticed that the isStarred
property though present on the example contact record is not showing on the Contact
interface provided by the library:
export interface Contact {
recordID: string;
backTitle: string;
company: string|null;
emailAddresses: EmailAddress[];
displayName: string;
familyName: string;
givenName: string;
middleName: string;
jobTitle: string;
phoneNumbers: PhoneNumber[];
hasThumbnail: boolean;
thumbnailPath: string;
postalAddresses: PostalAddress[];
prefix: string;
suffix: string;
department: string;
birthday: Birthday;
imAddresses: InstantMessageAddress[]
note: string;
}
Is there a reason for this? Has this property been recently unsupported? Is it because this property is only supposed to be available on Android devices?
Thanks!
from react-native-contacts.
@ayelenguini its just an oversight. When we first wrote the example we did not support typescript. Ts annotations were added later by another author. isStarred should be added to the ts definition but we should also check that they are properly set when creating a new contact.
from react-native-contacts.
@morenoh149 and what about when requesting the contact list itself? would this property be available on the return object? is it only available on android?
from react-native-contacts.
@ayelenguini it's probably missing when requesting the contact list itself as well
from react-native-contacts.
This issue is stale, please provide more information about the status
from react-native-contacts.
Related Issues (20)
- Is it possible to get all contacts along with their creation date? HOT 2
- contacts is null on initialize
- How to get or fetch real time contacts in react native HOT 2
- Show Permission Dialog when checking permission. HOT 1
- getContactsByPhoneNumber only returns after match HOT 8
- open platform depended contact list and select a specific contact from there HOT 1
- Interface of phoneNumber contains id property in it but it is not mentioned in the index.d.ts HOT 2
- iOS getById do not return thumbnailPath while getAll does HOT 11
- Contacts Profile changes HOT 2
- [Urgent - Android/Ios] List Contacts get real device show default some phone number HOT 1
- iOS: UIColor created with component values far outside the expected range HOT 3
- birthday do not work HOT 2
- getContactsMatchingString search also in addresses HOT 3
- Get Call history HOT 3
- Not able to add image while creating contact HOT 1
- How to Edit or Update contact details like familyName, givenName or number HOT 4
- React Native 0.74 (Bridgeless) Support HOT 4
- Update types for contact fields that may be null HOT 3
- Contact could not be saved when thumbnailPath is invalid on iOS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-contacts.