Oh, there’s a very nice “feature” on Samsung phones wrto your WIFI settings. IF you happen to configure and connect to a WIFI network, and then the WIFI network goes out of range, you will never be able to remove (forget) that WIFI setting again unless the phone can see access point….
You see, normal Android phones have a little button in the upper right corner called “saved networks”, where you can delete all your previous wifi settings, even the ones that are not in range.. Well, Samsung decided to get “creative” and removed that settings menu option. So the only way to remove a network setting to wait until you are nearby the network, long press the configured network that is in range and click on the “forget” popup menu….And of course this will only show up if the WIFI AP is actually in range. If it’s not in range, you won’t even see the configured setting in the WIFI list activity….
Why is this a problem? Well, if you were traveling and decided to connect to a WIFI hotspot at the airport, or hotel, and now you are home, you can’t remove that wifi settings anymore. It will never show up… And yet, it’s buried inside the setting app on the phone..And pretty soon, over time, you end up having 200+entries that are just sitting around…. If you have an IOT app that needs to connect over WIFI, it gets to fetch all 200+ entries that the phone decided to keep around…And since that API to fetch those entries returns the entire list, chances are the app will end up getting a runtime error because the size of those 200+ entries exceeds the maximum payload that can be set between two apps.
Oh, and normally, in previous versions of Android, you would be able to write a simple app that you could run that would simply remove those WIFI entries that you no longer needed, as long as the app had permissions to read and write WIFI settings.
Well, starting in Android 6.0.1, an app can only remove WIFI settings it created…. So for example, if you manually went to the WIFI settings to connect to a WIFI network, my app can’t delete the settings you created outside of the app.
And so the only way you can really remove these unused entries is, factory resetting the phone and wiping everything…. (Or rooting your phone and knowing which files to delete)