• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

WifiManager::getCountryCode()

mistay

Lurker
i'm trying to getCountryCode() on a WifiManager insance, i.e.

WifiManager wifiManager = (WifiManager) getSystemService (Context.WIFI_SERVICE);
wifiManager.getCountryCode();​

Although I set compileSdkVersion to 29 the compiler cannot find getCountryCode().

error: cannot find symbol
wifiManager.getCountryCode();
^
symbol: method getCountryCode()
location: variable wifiManager of type WifiManager​

This symbol should be accessible, as stated here
https://android.googlesource.com/pl...i/java/android/net/wifi/WifiManager.java#1723

Does anyone of you know, why the compiler cannot resolve getCountryCode()?
Btw: setCountryCode() can't be found either whereas getConnectionInfo() can be resolved and used.
 
Back
Top Bottom