ContactPicker

internal actual class ContactPicker(source)

Android-specific implementation of the ContactPicker contract.

internal expect class ContactPicker(source)

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

This class facilitates the selection of contacts from the device's native address book. Implementations are provided for different platforms (e.g., Android and iOS) to handle the specific APIs and UI flows required by each.

internal actual class ContactPicker(source)

iOS-specific implementation of the ContactPicker contract.

This implementation leverages the native CNContactPickerViewController from the ContactsUI framework to provide a familiar and secure contact selection experience for iOS users.

Constructors

Link copied to clipboard
constructor()
expect constructor()
constructor()

Properties

Link copied to clipboard
private var multiDelegate: CNContactPickerDelegateProtocol?
Link copied to clipboard
Link copied to clipboard
private lateinit var picker: ManagedActivityResultLauncher<Void?, Uri?>
Link copied to clipboard
Link copied to clipboard
private var singleDelegate: CNContactPickerDelegateProtocol?

Functions

Link copied to clipboard
private fun handleMultiContactPickerResult(result: ActivityResult, context: Context, coroutineScope: CoroutineScope, callback: (List<Contact>) -> Unit)
Link copied to clipboard
actual fun launchContactPicker()
expect fun launchContactPicker()

Triggers the display of the platform-specific contact picker interface.

actual fun launchContactPicker()

Displays the native iOS contact picker for single selection.

Link copied to clipboard

Triggers the display of the platform-specific multi-contact selection interface.

Displays the native iOS contact picker for multiple selection.

Link copied to clipboard
actual fun RegisterContactPicker(onContactSelected: (Contact?) -> Unit)
expect fun RegisterContactPicker(onContactSelected: (Contact?) -> Unit)

Registers the contact picker within the Compose composition.

actual fun RegisterContactPicker(onContactSelected: (Contact?) -> Unit)

Registers the callback for single contact selection.

Link copied to clipboard
actual fun RegisterMultiContactPicker(onContactsSelected: (List<Contact>) -> Unit)
expect fun RegisterMultiContactPicker(onContactsSelected: (List<Contact>) -> Unit)

Registers the multi-contact picker within the Compose composition.

actual fun RegisterMultiContactPicker(onContactsSelected: (List<Contact>) -> Unit)

Registers the callback for multiple contact selection.