I am facing the same problem and also tried to find a solution, without any success.
This stream seems to point to WifiManager, but it does not apply to Wifi Direct groups.
For example, the following code allows us to display a list of Wifi Networks so that we can delete them, but Wifi Direct groups are, of course, not included.
WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE); for (WifiConfiguration currentConfiguration : wifiManager.getConfiguredNetworks()) { wifiManager.removeNetwork(currentConfiguration.networkId); }
Anyone have an idea to deal with Wifi Direct groups?
David brun
source share