Good day all
In short, WifiManager.java is a source module given by Google API's for Wifi related functions.
its class declaration :
public class WifiManager {
obviously contains many functions, of which some I am able to access, and no they are not private functions
from the class description:
This class provides the primary API for managing all aspects of Wi-Fi connectivity. Get an instance of this class by calling
{@link android.content.Context#getSystemService(String) Context.getSystemService(Context.WIFI_SERVICE)}.
This calling this getting this WiFi_Service context, casted into a type WiFiManager object:
Context context = this;
WifiManager wifiManager = (WifiManager) context.getSystemService(context.WIFI_SERVICE);
and attempting to use the required method
from WiFiManager
Class:
public static final int WIFI_FREQUENCY_BAND_5GHZ = 1;
thus, calling:
wifiManager.setFrequencyBand(1, true);
results in an error:
Cannot resolve method 'setFrequencyBand(int, boolean)'
Here is method I am able to access from the WifiManager
class
public boolean setWifiEnabled(boolean enabled) {
try {
return mService.setWifiEnabled(enabled);
} catch (RemoteException e) {
return false;
}
}
but not this one (of which there are many more):
public void setFrequencyBand(int band, boolean persist) {
try {
mService.setFrequencyBand(band, persist);
} catch (RemoteException e) { }
}