You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this exist in the current API scheme with fetching? Im not seeing an easy way to check this data without a secondary cursor query on the phones and emails.
The text was updated successfully, but these errors were encountered:
bmc08gt
changed the title
easier access to primary phone and emails
Primary Phone/Email support?
Apr 17, 2023
This is not something currently supported by ContactStore but it seems like a straightforward thing to support.
It should be a as simple as adding a isPrimary boolean to LabeledValue and forwarding the respective value in ContactQueries If you are up for contributing. (Line 301ish)
columnsToFetch.contains(Phones) && mimetype ==PhoneColumns.CONTENT_ITEM_TYPE-> {
val phoneNumberString = item.getAsStringOrEmpty(PhoneColumns.NUMBER)
val id = item.getAsLong(PhoneColumns._ID)
if (phoneNumberString.isNotBlank() && id !=null) {
// check if primaryval isPrimary = item.getAsInteger(PhoneColumns.IS_PRIMARY) !=0val value =PhoneNumber(phoneNumberString)
val phoneEntry =// forward primary to LabeledValueLabeledValue(value, phoneLabelFrom(item), id, account, isPrimary)
phones.add(phoneEntry)
}
}
this would need to be done for all ContactColumns.
Does this exist in the current API scheme with fetching? Im not seeing an easy way to check this data without a secondary cursor query on the phones and emails.
The text was updated successfully, but these errors were encountered: