sample-apps-for-matter-android icon indicating copy to clipboard operation
sample-apps-for-matter-android copied to clipboard

How to get all fabrics from device

Open armysman opened this issue 1 year ago • 3 comments

CSA SDK V1.1, Use api OperationalCredentialsCluster->readFabricsAttribute just callback one fabric. The iOS platform use Apple SDK api which has a params can filter callback, but java layer has not similar this. is there any way can get all fabrics from devices.

armysman avatar Jul 11 '23 06:07 armysman

Could you provide the kotlin code that you use to get all the fabrics. I'll replicate and investigate.

pierredelisle avatar Jul 13 '23 02:07 pierredelisle

suspend fun getCommissionedFabrics(context: Context, nodeId: Long, callback: FabricsAttributeCallback){
    ChipClusters.OperationalCredentialsCluster(getConnectedDevicePointer(context, nodeId), 0).readFabricsAttribute(callback)
}

armysman avatar Jul 13 '23 08:07 armysman