Package-level declarations

Types

Link copied to clipboard
internal actual class ContactPicker

Android-specific implementation of the ContactPicker contract.

internal expect class ContactPicker

An expected class that defines the contract for a platform-specific contact picker.

internal actual class ContactPicker

iOS-specific implementation of the ContactPicker contract.

Link copied to clipboard

Defines the contract for managing the state and interactions of a contact picker.

Link copied to clipboard
internal class ContactPickerStateImpl(val contactPicked: (Contact?) -> Unit) : ContactPickerState

Concrete implementation of ContactPickerState responsible for bridging the common state management with platform-specific contact picking logic.

Link copied to clipboard
private class MultiContactPickerDelegate(val onContactsSelected: (List<Contact>) -> Unit) : NSObject, CNContactPickerDelegateProtocol

Delegate for multiple contact selection.

Link copied to clipboard

Defines the contract for managing the state and interactions of a multi-contact picker.

Link copied to clipboard
internal class MultiContactPickerStateImpl(val contactsPicked: (List<Contact>) -> Unit) : MultiContactPickerState

Concrete implementation of MultiContactPickerState.

Link copied to clipboard
private class SingleContactPickerDelegate(val onContactSelected: (Contact?) -> Unit) : NSObject, CNContactPickerDelegateProtocol

Delegate for single contact selection.

Properties

Link copied to clipboard
private const val ACTION_PICK_CONTACTS: String
Link copied to clipboard
private val AvatarColors: List<Color>
Link copied to clipboard

Columns queried from the ContactsContract.Contacts table.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
private fun ContactItem(contact: Contact, isSelected: Boolean, onToggle: () -> Unit)
Link copied to clipboard
internal fun CustomMultiContactPicker(contacts: List<Contact>, isLoading: Boolean, onDismiss: () -> Unit, onDone: (List<Contact>) -> Unit)
Link copied to clipboard
internal suspend fun fetchAllContacts(context: Context): List<Contact>
Link copied to clipboard
private fun findTopMostViewController(root: UIViewController?): UIViewController?
Link copied to clipboard
private fun getAvatarColor(name: String): Color
Link copied to clipboard
internal fun getContactAvatar(context: Context, contactId: Long): ByteArray?

Resolves the contact's photo into a ByteArray.

Link copied to clipboard
internal fun getContactFromUri(context: Context, uri: Uri): Contact?

Extracts comprehensive contact data from the provided Uri.

Link copied to clipboard
internal fun getContactsByUris(context: Context, uris: List<Uri>): List<Contact>

Extracts comprehensive contact data from the provided Uris.

Link copied to clipboard
private fun getEmailAddress(emailAddresses: List<*>): List<String>
Link copied to clipboard
internal fun getEmailAddresses(context: Context, contactIds: List<String>? = null): Map<String, List<String>>

Queries the ContactsContract.CommonDataKinds.Email table for email addresses. If contactIds is null, it fetches all email addresses.

Link copied to clipboard
internal fun getPhoneNumbers(context: Context, contactIds: List<String>? = null): Map<String, List<String>>

Queries the ContactsContract.CommonDataKinds.Phone table for numbers. If contactIds is null, it fetches all phone numbers.

private fun getPhoneNumbers(contactList: List<*>): List<String>
Link copied to clipboard
private fun mapCNContactToContact(cnContact: CNContact): Contact
Link copied to clipboard
internal suspend fun processContactPickerSessionUri(context: Context, sessionUri: Uri): List<Contact>

Processes the Session URI returned by the Android 17+ Contact Picker.

Link copied to clipboard
private fun NSData.toByteArray(): ByteArray
Link copied to clipboard
private fun UIViewController.Companion.topMostViewController(): UIViewController?