Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void scanLeDevice(final boolean enable) {
- if (enable) {
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- mBluetoothAdapter.stopLeScan(mLeScanCallback);
- connectToDevice();
- }
- }, 15000);
- mBluetoothAdapter.startLeScan(mLeScanCallback);
- } else {
- mBluetoothAdapter.stopLeScan(mLeScanCallback);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement