Android, NSD/DNS-SD: NsdManager unreliable discovery and IP resolution

前端 未结 2 705
别那么骄傲
别那么骄傲 2021-02-05 11:20

In the course of the last weeks, Android\'s NSD implementation is making me go mad:

From a user\'s point of view, the following problems arise:

  • Devices

2条回答
  •  别那么骄傲
    2021-02-05 11:25

    It's probably no longer relevant, but I discovered one of the possible causes of my problem: from my experience it seems NSD behaves extremely unreliable if you do further processing within the thread of the NsdManager callback methods. Even if there is just a few lines of code, the weirdest results regarding discovery occur. So one must offload any work from the callback methods to another thread, and avoid to block the NsdManager at all costs, even for a millisecond.

提交回复
热议问题