Skip to content

Commit

Permalink
set TXT record on android (#12715)
Browse files Browse the repository at this point in the history
* set TXT record on android to fix chip-tool discover commissionables no info error

* fix restyled-io and ci errors
  • Loading branch information
xylophone21 authored Dec 8, 2021
1 parent 0aedea7 commit 994d7c5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ public void publish(
serviceInfo.setServiceType(type);
serviceInfo.setPort(port);
Log.i(TAG, "publish serviceName=" + serviceName + " type=" + type + " port=" + port);
int cnt = Math.min(textEntriesDatas.length, textEntriesKeys.length);
for (int i = 0; i < cnt; i++) {
String value = new String(textEntriesDatas[i]);
serviceInfo.setAttribute(textEntriesKeys[i], value);
Log.i(TAG, " " + textEntriesKeys[i] + "=" + value);
}

NsdManager.RegistrationListener registrationListener =
new NsdManager.RegistrationListener() {
Expand Down

0 comments on commit 994d7c5

Please sign in to comment.