title: CompanionDeviceManager 'onDeviceFound' Callback Function Not Being Called
body: <p>We are trying to use CompanionDeviceManager class to pair our BLE device with our Android (Version 10) phone without need of location permission.</p>
  <p>For testing purposes we activited bluetooth of multiple phones and ble devices around our test device.</p>
  <p>We are using the example code from <a href="https://developer.android.com/guide/topics/connectivity/companion-device-pairing" rel="noreferrer">official site</a> without success.</p>
  <p>Added these codes to AndroidManifest file:</p>
  <pre><code>&lt;uses-feature android:name=&quot;android.hardware.bluetooth&quot;/&gt;
  &lt;uses-feature android:name=&quot;android.software.companion_device_setup&quot;/&gt;
  &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_ADMIN&quot; /&gt;
  </code></pre>
  <p>Complete code of MainActivity :</p>
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  
      private CompanionDeviceManager deviceManager;
      private AssociationRequest pairingRequest;
      private BluetoothDeviceFilter deviceFilter;
  
      private static final int SELECT_DEVICE_REQUEST_CODE = 42;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Log.e(&quot;ArkSigner&quot;, &quot;onCreate called.&quot;);
  
          deviceManager = getSystemService(CompanionDeviceManager.class);
  
          // To skip filtering based on name and supported feature flags (UUIDs),
          // don't include calls to setNamePattern() and addServiceUuid(),
          // respectively. This example uses Bluetooth.
          deviceFilter = new BluetoothDeviceFilter.Builder()
                  //.setNamePattern(Pattern.compile(&quot;Test&quot;))
                  //.addServiceUuid(new ParcelUuid(new UUID(0x123abcL, -1L)), null)
                  .build();
  
          // The argument provided in setSingleDevice() determines whether a single
          // device name or a list of device names is presented to the user as
          // pairing options.
          pairingRequest = new AssociationRequest.Builder()
                  .addDeviceFilter(deviceFilter)
                  //.setSingleDevice(true)
                  .build();
  
          List&lt;String&gt; associations = deviceManager.getAssociations();
  
          // When the app tries to pair with the Bluetooth device, show the
          // appropriate pairing request dialog to the user.
          deviceManager.associate(pairingRequest,
                  new CompanionDeviceManager.Callback() {
                      @Override
                      public void onDeviceFound(IntentSender chooserLauncher) {
                          try {
  
                              Log.e(&quot;ArkSigner&quot;, &quot;onDeviceFound called.&quot;);
  
                              startIntentSenderForResult(chooserLauncher,
                                      SELECT_DEVICE_REQUEST_CODE, null, 0, 0, 0);
                          } catch (IntentSender.SendIntentException e) {
                              e.printStackTrace();
                          }
                      }
  
                      @Override
                      public void onFailure(CharSequence error) {
                          Log.e(&quot;ArkSigner&quot;, &quot;onFailure called.&quot;);
                      }
                  },
                  null);
  
  
      }
  
  
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
  
          super.onActivityResult(requestCode, resultCode, data);
          
          Log.e(&quot;ArkSigner&quot;, &quot;onActivityResult called.&quot;);
  
          if (requestCode == SELECT_DEVICE_REQUEST_CODE &amp;&amp;
                  resultCode == Activity.RESULT_OK) {
              // User has chosen to pair with the Bluetooth device.
              BluetoothDevice deviceToPair =
                      data.getParcelableExtra(CompanionDeviceManager.EXTRA_DEVICE);
              deviceToPair.createBond();
  
              // ... Continue interacting with the paired device.
          }
      }
  }
  </code></pre>
  <p>After we run our Android application, we are not seeing any dialog about found devices.(Bluetooth or BLE devices)</p>
  <p>Edit: If we give a devicename in line &quot;.setNamePattern(Pattern.compile(&quot;Test&quot;))&quot; or use &quot;.setSingleDevice(true)&quot; it doesn't change anything.</p>