code: private void doDiscovery() {
          if (D)
              Log.d(TAG, "doDiscovery()");
  
          // Indicate scanning in the title
          setProgressBarIndeterminateVisibility(true);
          setTitle(R.string.scanning);
  
          // Turn on sub-title for new devices
          findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);
  
          // If we're already discovering, stop it
          if (mBtAdapter.isDiscovering()) {
              mBtAdapter.cancelDiscovery();
          }
  
          // Request discover from BluetoothAdapter
          mBtAdapter.startDiscovery();
      }
docs: Start device discover with the BluetoothAdapter