Missing method in android.net.wifi.WifiManager

On the website androidjavadoc.com , the WifiManager method is specified in the WifiManager class, which allows you to perform active wi-fi scanning. It has been discussed here recently.

However, when I try to use this method in Eclipse, it is not found (undefined). startScan is. I tried this with all versions of android.jar shipped with the Android SDK (2.3 to 3.1).

Is there a function? How can I access it?

thanks a lot

+4
source share
3 answers

Here is my own explanation based on quoted resources: This feature is not contained in the Android SDK. In the source code, it is tagged with Javadoc @hide ( source ), which forces it to be excluded from the documentation, but also not compiled for the SDK. For testing purposes, a custom jar file can be compiled and used. But on the mobile phone itself, it will depend on the provider if this method is present.

Similar question. Post to androidjavadoc.com.

+2
source

As I mentioned, check out the official documentation. This is not true. Thus, it is not part of the public API, and you should not call it. Even if it is publicly available, it does not mean that you can name it.

Undocumented API calls may disappear without notice at any time in future versions, which will break your application.

+3
source

When all else fails, go to the roots:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3.4_r1/android/net/wifi/WifiManager.java#WifiManager.startScanActive%28%29

This is a public method in WifiManager since version 1.6, although you correctly say that Eclipse does not find this method for some strange reason.

0
source

All Articles