Zach
Zach

Reputation: 10139

Disconnect from a wifi direct group

I want to disconnect from a wifi direct group after establishing a connection. I just want to move out silently without interrupting other clients that are already in connection with the Group owner.

I use manager.Connect() method to establish a connection. But didnt see any methods to disconnect. Only other option i saw is manager.removeGroup(), but I guess this will remove the entire group and interrupt the existing network connection.

How can I do this properly?

Thanks

Upvotes: 5

Views: 4074

Answers (2)

 manager.cancelConnect(channel, null);

Upvotes: -2

Kan
Kan

Reputation: 133

The first parameter of the function removeGroup() is a channel. So I think if this is initiated by a client, only the channel between the client and group owner will be disconnected.

Upvotes: 3

Related Questions