Nearby Connection 2.0: Identify endpoint over reconnection

泄露秘密 提交于 2020-01-13 19:42:08

问题


Is there a way to uniquely identify a discovered endpoint and persist that information over reconnection? Apparently the endpointId changes after a disconnection. If I correctly recall, in the former api there was a persistent identifier.


回答1:


Nearby Connections doesn't support reconnections yet, but you can encode a persistent id in your endpoint name (eg. endpointName="1234:Will").

Please note that the endpoint name can be spoofed, so if you need a secure connection you need to either compare the auth token or do some more authentication after accepting the connection.



来源:https://stackoverflow.com/questions/47369402/nearby-connection-2-0-identify-endpoint-over-reconnection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!