【发布时间】:2017-02-28 04:39:46
【问题描述】:
当我调试我的 android studio 项目时,它得到了 Wifi扫描结果android.net.wifi.WifiManager@4249dfb0 我应该怎么做才能纠正它?我的安卓代码如下
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");
}
}
【问题讨论】:
-
欢迎来到 Stack Overflow!请编辑您的问题以发布minimal code that reproduces the problem that you're asking about。这将使我们有更好的机会在不要求澄清的情况下提供帮助
-
我正在研究信标技术。我在 android studio 中制作了一个项目,当用户打开他们的 wifis 时会发送通知。当我调试我的项目时,我得到 Wifi Scan Resultandroid.net.wifi.WifiManager@4249dfb0
-
你能提供一些代码吗?这样其他人,不仅是我,也可以回答你,避免对你的问题投反对票
标签: android android-wifi