diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt
index 37c7fa7ab1cdd1..cb7c3b780f640e 100644
--- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt
+++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt
@@ -124,6 +124,7 @@ class BasicClientFragment : Fragment() {
getString(R.string.basic_cluster_serial_number_text) -> sendReadSerialNumberAttribute()
getString(R.string.basic_cluster_local_config_disabled_text) -> sendReadLocalConfigDisabledAttribute()
getString(R.string.basic_cluster_reachable_text) -> sendReadReachableAttribute()
+ getString(R.string.basic_cluster_unique_id_text) -> sendReadUniqueIDAttribute()
getString(R.string.basic_cluster_cluster_revision_text) -> sendReadClusterRevisionAttribute()
}
}
@@ -147,6 +148,7 @@ class BasicClientFragment : Fragment() {
ATTRIBUTES.add(getString(R.string.basic_cluster_serial_number_text))
ATTRIBUTES.add(getString(R.string.basic_cluster_local_config_disabled_text))
ATTRIBUTES.add(getString(R.string.basic_cluster_reachable_text))
+ ATTRIBUTES.add(getString(R.string.basic_cluster_unique_id_text))
ATTRIBUTES.add(getString(R.string.basic_cluster_cluster_revision_text))
}
@@ -441,6 +443,20 @@ class BasicClientFragment : Fragment() {
})
}
+ private suspend fun sendReadUniqueIDAttribute() {
+ getBasicClusterForDevice().readUniqueIDAttribute(object : ChipClusters.CharStringAttributeCallback {
+ override fun onSuccess(value: String) {
+ Log.i(TAG,"[Read Success] UniqueID $value")
+ showMessage("[Read Success] UniqueID: $value")
+ }
+
+ override fun onError(ex: Exception) {
+ showMessage("Read UniqueID failure $ex")
+ Log.e(TAG, "Read UniqueID failure", ex)
+ }
+ })
+ }
+
private suspend fun sendReadClusterRevisionAttribute() {
getBasicClusterForDevice().readClusterRevisionAttribute(object : ChipClusters.IntegerAttributeCallback {
override fun onSuccess(value: Int) {
diff --git a/examples/android/CHIPTool/app/src/main/res/values/strings.xml b/examples/android/CHIPTool/app/src/main/res/values/strings.xml
index 4bc4263821bbaa..b1df988ff6722d 100644
--- a/examples/android/CHIPTool/app/src/main/res/values/strings.xml
+++ b/examples/android/CHIPTool/app/src/main/res/values/strings.xml
@@ -131,6 +131,7 @@
SerialNumber
LocalConfigDisabled
Reachable
+ UniqueID
ClusterRevision
Read