Is it possible to programmatically delete forgotten Wifi Direct groups from Android?

We noticed that when a Wifi Direct group is remembered by a device, which sometimes causes problems when reconnecting devices. Removing problem groups seems to solve this problem.

It would be nice if we could do this in an application, is this possible?

Just calling WifiP2pManager.removeGroup() does not stop the storage device.

Remembered Wifi Direct groups UI

+8
android wifi wifi-direct
source share
2 answers

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?

0
source share

It can be easily accessed by these methods without the need for reflaction by creating an open version of android.jar. Here is the guide I created: http://androidwarzone.blogspot.co.il/2014/08/use-android-hidden-and- internal-methods.html

0
source share

All Articles