connect to android devices using wifi direct without prompt

前端 未结 2 1840
广开言路
广开言路 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:06

    This can be achieve using Xposed framework. You need add the code and install the App. The phone needs to be rooted in order for it to work. I have tested it on multiple Samsung phones and it works. Check this answer for details: How to auto-accept Wi-Fi Direct connection requests in Android

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题