Skip to content Skip to sidebar Skip to footer

Missing Method In Android.net.wifi.wifimanager

On the site androidjavadoc.com, a method startScanActive is listed in the class WifiManager that makes it possible to perform an active wi-fi scan. It has been discussed here recen

Solution 1:

As I mentioned, look at the official documentation. It's not there. As such, it's not part of the public API, and you should not call it. Even if it's public, it doesn't mean that you can call it.

Undocumented API calls can disappear without notice at any time in future versions, which will cause your app to break.

Solution 2:

Here goes my own explanation, based on the cited resources: The function is not contained in the Android SDK. In the source code, it is marked with the Javadoc tag @hide (source), which causes it to be excluded from the documentation but also not to be compiled for the SDK. For testing purposes, an own jar file may be compiled and used. But on the cell phone itself, it will depend on the vendor if the method will be present.

Similar question.Post on androidjavadoc.com.

Solution 3:

When everything 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

It is a public method in WifiManager since 1.6, although you're correct in saying that Eclipse does not find that method, for some weird reason.

Post a Comment for "Missing Method In Android.net.wifi.wifimanager"