Disconnect from a direct wifi group

I want to disconnect from the direct wifi group after establishing a connection. I just want to move freely without interrupting other clients who are already associated with the group owner.

I use the manager.Connect () method to establish a connection. But I did not see any ways to disconnect. Only the other option I saw is manager.removeGroup () , but I think this will delete the entire group and interrupt the existing network connection.

How can I do it right?

thanks

+4
source share
2 answers

The first parameter to the removeGroup () function is the channel. Therefore, I think that if this is initiated by the client, only the channel between the client and the group owner will be disabled.

+3
source
manager.cancelConnect(channel, null); 
-1
source

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


All Articles