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
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.