How to get the selected chips from a Chip Group in Kotlin.

  1. Update your Material Gradle dependency version
implementation ''

2. You get this method: checkedChipIds

tagGroup.checkedChipIds.forEach {
Log.d("TEST", " chip ids ---> " + it)

If you are using old material version you don’t have the method: checkedChipIds, and have to create the method. To create local method to return checked chips:

fun ChipGroup.getCheckedChipIds()…