Wifi Scan Resultandroid.net.wifi.WifiManager@4249dfb0

时间:2017-02-28 04:39:46

标签: android android-wifi

当我调试我的android studio项目时,它正在进行中 Wifi Scan Resultandroid.net.wifi.WifiManager@4249dfb0 我该怎么做才能纠正它?我的android代码在

之下
public class WifiService extends Service implements BluetoothDeviceListener,WiFiDeviceListener{

public WifiService() {
}

@Override
public IBinder onBind(Intent intent) {

    // TODO: Return the communication channel to the service.
    BLEManager bleManager= new BLEManager(this);
    bleManager.scanLeDevice(25,25);
    //bleManager.stopLeDeviceScan();
    WiFiManager wiFiManager= new WiFiManager(this);
    wiFiManager.scanWiFiDevice(25,25);
    //wiFiManager.stopWiFiScan();



    throw new UnsupportedOperationException("Not yet implemented");

}
@Override
public void onLeDeviceDiscovered(ArrayList<BluetoothDevice> deviceList) {
    System.out.println("bluetooth enable notifications");
}
@Override
public void onWiFiDeviceDiscovered(ArrayList<WirelessFiDevice> deviceList) {
    System.out.println("wifi enable notifications");
 }
}

1 个答案:

答案 0 :(得分:0)

代码将遵循

public class WifiService extends Service实现了BluetoothDeviceListener,WiFiDeviceListener {

public WifiService(){ }

@覆盖

public void onCreate(){

 BLEManager bleManager= new BLEManager(this);
bleManager.scanLeDevice(25,25);
//bleManager.stopLeDeviceScan();
WiFiManager wiFiManager= new WiFiManager(this);
wiFiManager.scanWiFiDevice(25,25);
//wiFiManager.stopWiFiScan();

}

@覆盖

public IBinder onBind(Intent intent){

// TODO: Return the communication channel to the service.

throw new UnsupportedOperationException("Not yet implemented");

}

@覆盖

public void onLeDeviceDiscovered(ArrayList deviceList){

System.out.println("bluetooth enable notifications");

}

@覆盖

public void onWiFiDeviceDiscovered(ArrayList deviceList){

System.out.println("wifi enable notifications");

}

}