Skip to content

Instantly share code, notes, and snippets.

@don
Last active November 11, 2015 16:49
Show Gist options
  • Save don/1953b1805489e5f11974 to your computer and use it in GitHub Desktop.
Save don/1953b1805489e5f11974 to your computer and use it in GitHub Desktop.
BluetoothManager manager =
(BluetoothManager) activity.getSystemService(Context.BLUETOOTH_SERVICE);
BluetoothAdapter adapter = manager.getAdapter();
bluetoothAdapter.startLeScan(callback);
// BluetoothAdapter.LeScanCallback
@Override
public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) {
// process scan results
}
bluetoothAdapter.startLeScan(serviceUUIDs, callback);
bluetoothAdapter.stopLeScan(callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment