diff --git a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java index 02c0b9662c742c..55f4a7a7210b92 100644 --- a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java +++ b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java @@ -127,7 +127,13 @@ public void publish( String[] subTypes) { NsdServiceInfo serviceInfo = new NsdServiceInfo(); serviceInfo.setServiceName(serviceName); - serviceInfo.setServiceType(type); + + StringBuilder sb = new StringBuilder(type); + for (String subType:subTypes) { + sb.append(","+subType); + } + serviceInfo.setServiceType(sb.toString()); + serviceInfo.setPort(port); Log.i(TAG, "publish serviceName=" + serviceName + " type=" + type + " port=" + port); int cnt = Math.min(textEntriesDatas.length, textEntriesKeys.length);