Android WiFi Direct - connecting without a hint?

Is it possible to automatically connect two devices without requiring the user to click the accept button when creating an Android WiFi Direct P2P connection?

+4
source share
5 answers

A bit late answer, but it can help someone find the answer.

Yes, it’s possible by creating an access point, as @hengsti said, but I would suggest using the Google Connected Connections API instead ( Near → Connections API ). It is much more reliable and easier to use.

+4
source

Check out this link https://groups.google.com/forum/#!topic/android-platform/hN5WfXRzXpI , this may help. He conducted several experiments on the connection path, this could help

0
source

Maybe, but your device must be rooted. See my answer to a close question: fooobar.com/questions/591714 / ....

A more complex alternative is to create your own ROM with the patch already applied.

0
source

As soon as two devices are connected at least once, confirmation is no longer required. Otherwise, the other two answers to it cover pretty well, at the moment this is not possible, and there will probably never be, at least, according to this report an “error” , which was considered obsolete by one of the participants in the Android project (see message 46 )

0
source

At the same time, this is possible by calling creategroup() , where you immediately become the owner of the goup wifi-direct connection. This creates an Access Point to which the client can connect. The client can get the SSID and password with the WIFI_P2P_CONNECTION_CHANGED_ACTION event, see this blog and code .

0
source

Source: https://habr.com/ru/post/1484549/


All Articles