title: Android BroadcastReceiver with no intent-filter
body: <p>I've come across something like this in the AndroidManifest.xml:</p>
  
  <pre><code>&lt;receiver android:name="com.testco.test.TestReceiver"/&gt;
  </code></pre>
  
  <p>The above is TestReceiver extends the BroadcastReceiver class. I thought the receiver will receive all intents but apparently it doesn't, and it doesn't work unless I add intent-filter tags in it. So what does it do if it has no intent-filter? Is it a typo or does it really do something?</p>
  
  <p>UPDATE: I figured this out with the help of this link <a href="https://stackoverflow.com/questions/8858692/trying-to-have-a-broadcast-receiver-with-no-filter">Trying to have a Broadcast Receiver with No filter</a></p>
  
  <p>Instead of calling a broadcast with the usual String identifier, you can set an action string to the intent, then broadcast it. Sample code for reference:</p>
  
  <pre><code>Intent notifyIntent = new Intent(getApplicationContext(), TestReceiver.class);
  notifyIntent.setAction("RECEIVE");
  sendBroadcast(notifyIntent);
  </code></pre>
  
  <p>The handling at the BroadcastReceiver is the same.</p>