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.
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.