title: Why my BroadcastReceiver doesn't work?
body: <p>I'm trying to learn to use Android BroadcasReceiver. 
  I wrote this code but It doesn't work... I tryed for example to change the Time etc...
  What is it wrong?</p>
  
  <p>I added in the Manifest:</p>
  
  <pre><code>&lt;receiver android:name="com.example.broadcastreceiverspike.Broadcast" &gt;
          &lt;intent-filter android:priority="100"&gt;
              &lt;action android:name="android.intent.action.ACTION_SCREEN_ON" /&gt;
              &lt;action android:name="android.intent.action.ACTION_SCREEN_OFF" /&gt;
              &lt;action android:name="android.intent.action.TIME_SET" /&gt;
          &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>My simple BroadcasReceiver:</p>
  
  <pre><code>    public class Broadcast extends BroadcastReceiver {
          @Override
          public void onReceive(Context context, Intent intent) {
             Log.d("BROADCAST", "It worked");
             Toast.makeText(context, "BROADCAST",  Toast.LENGTH_LONG).show();
          }
  }
  </code></pre>
  
  <p>My Main Activity (default main Activity)</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>