network-scan

Android listing BLE devices after device scan

余生长醉 提交于 2019-11-28 07:03:52
Can u provide me the simple code for scanning the nearby BLE devices and list it by device name and MAC ID. I tried this using sample code provided in http://developer.android.com/guide/topics/connectivity/bluetooth-le.html . But didn't work, any reference link or ideas since i am new to BLE app. kodartcha This example is based on the developers web you posted and works great for me. This is the code: DeviceScanActivity.class package com.example.android.bluetoothlegatt; import android.app.Activity; import android.app.ListActivity; import android.bluetooth.BluetoothAdapter; import android

List / Scan for available WiFis iPhone

泪湿孤枕 提交于 2019-11-27 14:12:46
问题 I'm searching for a way to present available WiFis in an iPhone App. So far my research resulted in the following: Apps that implement(ed) such a functionality were removed from the AppStore (means you can't deploy the App via AppStore which is fine for me) Apple hides the functionality that is necessary for a scan in a private framework and you can't find any explanations/comments/examples on "how to use" http://code.google.com/p/iphone-wireless seems to be most promising. anyway, i can't

android BluetoothDevice.getName() return null

别来无恙 提交于 2019-11-27 01:37:57
On sometime, BluetoothDevice.getName() return null. How can i fix it? remoteDeviceName maybe null in following code. And i need distinguish my device and other devices by remoteDeviceName. BluetoothAdapter.getDefaultAdapter().startLeScan(new LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) { String remoteDeviceName = device.getName(); Log.d("Scanning", "scan device " + remoteDeviceName); }); Finally, i found out the solution: 1.For device connected: Read device name from gatt characteristic org.bluetooth.characteristic.gap