connect to android devices using wifi direct without prompt

前端 未结 2 1845
广开言路
广开言路 2020-12-13 16:52

i am trying to connect two android devices using WIFI direct and i was successful. But the problem is the second device has to accept the a connection prompt after the other

2条回答
  •  不知归路
    2020-12-13 17:15

    You could indeed simply use the createGroup function from the API to create a group, which also makes the access point. The first problem here is that the access point name & password are set automatically, and you can not change them.

    So, you do need to pass the info to the connecting party, and for this, I would suggest using the local service advertising, and using the instance name there.

    Did make simple test app for this and you can find it from Github under DrJukka/MyWifiMesh, also some discussions on the topic can be found from my blog

提交回复
热议问题