title: Register broadcast receiver dynamically does not work - BluetoothDevice.ACTION_FOUND
body: <p>Using <code>Log</code> class to track Runtime show that <code>onReceive()</code> methode does not called,why ?</p>
  
  <p><strong>Register broadcast receiver dynamically</strong></p>
  
  <pre><code> private void discoverDevices () {
      Log.e("MOHAB","BEFORE ON RECEIVE");
  
       mReceiver = new BroadcastReceiver() {
          public void onReceive(Context context, Intent intent) {
              Log.e("MOHAB","ON RECEIVE");
              String action = intent.getAction();
              // When discovery finds a device
              if (BluetoothDevice.ACTION_FOUND.equals(action)) {
                  // Get the BluetoothDevice object from the Intent
                  BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                  // Add the name and address to an array adapter to show in a ListView
                  Bluetooth b = new Bluetooth(device.getName(),device.getAddress());
                  list.add(b);
              }
          }
      };
      Log.e("MOHAB","create intentFilter");
      // Register the BroadcastReceiver
      IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
      registerReceiver(mReceiver, filter); // Don't forget to unregister during onDestroy
  
  }
  </code></pre>