Skip to content

1.0.0

Choose a tag to compare

@yrezgui yrezgui released this 15 Aug 13:38
· 1 commit to main since this release
Introduce contact data type selection for ACTION_PICK

This commit introduces the ability to select the type of contact data to retrieve when using the `ACTION_PICK` intent.

Key changes:
- Added `ContactUtils.kt` with a `ContactDataType` enum (Name, Phone, Address, Email) to define different contact data types and their corresponding content URIs.
- Modified `PickIntent.kt`:
    - The `CustomPickContact` contract now uses `setData()` instead of `setDataAndType()` for the intent.
    - Added a `SingleChoiceSegmentedButtonRow` to allow the user to select a `ContactDataType`.
    - The `pickContact.launch()` call now uses the URI from the `selectedDataType`.
    - Wrapped the displayed contact data items in a `SelectionContainer` to allow text selection.
    - Updated the `LazyColumn` to include the new segmented button for data type selection.