Repository navigation
Releases
Releases · yrezgui/android-contact-experiments
1.0.1
Sort contact data by column name This commit fixes `ContentResolverUtils.kt` to sort the retrieved contact data alphabetically by column name properly. Specifically, the `getAllData()` extension function for `Cursor` now uses `toSortedMap()` to ensure the resulting map is sorted by its keys (column names).
1.0.0
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.