Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 android 中的 NSDManager。如何使用此 DiscoveryListener 获取所有设备。这里在文档中给出了查找服务的方法,但是如何在 android studio 中实现它们。我曾尝试使用此文档参考,但如何获取所有列表。
我创建了一个 arraylist 来添加在 onServiceFound 中实现的设备列表在 onCreate 方法中我也称为发现 linsener。我还在清单文件中给出了首选项。是否还有更多事情要做才能获得这份名单?
如果您只是在寻找可用的服务,那么之前已经在 SO 上提出过这个问题。
如何使用 Android 的原生网络服务发现查找所有可用服务
这篇文章可能会被标记为重复。只是在说'
Question2:
I'm confused on ArrayList<Object>, please explain to me the following:
ArrayList<Object>
I have a class Node which has two fields: data1 and data2
Node
data1
data2