title: Reaction to Bluetooth Pairing dialog input
body: <p>I am working on an App that connects the android device with another device (CAN modules) over Bluetooth.</p>
  
  <p>I pair previously unpaired devices like this:</p>
  
  <pre><code>Method m = device.getClass().getMethod("createBond", (Class[]) null);
  m.invoke(device, (Object[]) null);
  </code></pre>
  
  <p>Which works like a charm.</p>
  
  <p>There is an issue though. The CAN Modules are set up in a way that you don't need the pin stuff or any other form of pairing confirmation, you just say that you want to pair with the device and it'll do so. Now, what happens if my App tries to connect to a Bluetooth device that is not a CAN Module, like a phone for example?</p>
  
  <p>In that case, a Dialog appears asking the User to confirm the pairing. I don't mind the dialog, BUT I would like to react to the "Cancel" button in some way.</p>
  
  <p>To sum it up:
  I want to call method <code>doSomething()</code> when the User presses <code>Cancel</code> on the Bluetooth Pairing Confirmation Dialog. Is this possible?</p>