Have some problem to use android.net.wifi开发者_JAVA百科.ScanResult class in my own service. In fact i have noticed that CREATOR in my class is missing, but in android doc (http://www.kiwidoc.com/java/l/x/android/android/8/p/android.net.wifi/c/ScanResult) CREATOR is present, i have tried with all versions of SDK and i lose hope... : (
Anyone can help me ?
Thanks,
Anthony.
The ScanResult class does not have a public constructor. It is intended to be returned from a scan of available WiFi connections, for example:
WifiManager wifiMgr = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
if(wifiMgr.isWifiEnabled()) {
  List<ScanResult> scanResults = wifiMgr.getScanResults();
  for(ScanResult scanRes : scanResults) {
    // Do something with scanRes
  }
}
Refer to the official Android documentation for ScanResult at: http://developer.android.com/reference/android/net/wifi/ScanResult.html
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论