title: Check if the broadcstreceiver is registered?
body: <p>Is there any way to check if the broadcast receiver is working or not.</p>
  
  <p>I did it like below. I register the broadcast receiver but it doesn't find this registered receiver..</p>
  
  <pre><code>PackageManager pm = getApplicationContext().getPackageManager();
  final List&lt;PackageInfo&gt; packs = pm.getInstalledPackages(PackageManager.GET_RECEIVERS);
      for (final PackageInfo p : packs) {
          ActivityInfo[] receivers = p.receivers;
          if (receivers != null) {
              for (ActivityInfo ai : receivers) {
                  if(AppDetectionService.class.getName().equals(ai.name)){
                      onOff[2] = true;
                  }
              }
          }                   
      }
  </code></pre>