title: Android - how to receive broadcast intents ACTION_SCREEN_ON/OFF?
body: <pre><code>    &lt;application&gt;
           &lt;receiver android:name=".MyBroadcastReceiver" android:enabled="true"&gt;
                  &lt;intent-filter&gt;
                        &lt;action android:name="android.intent.action.ACTION_SCREEN_ON"&gt;&lt;/action&gt;
                        &lt;action android:name="android.intent.action.ACTION_SCREEN_OFF"&gt;&lt;/action&gt;
                  &lt;/intent-filter&gt;
           &lt;/receiver&gt;
  ...
      &lt;/application&gt;
  </code></pre>
  
  <p><code>MyBroadcastReceiver</code> is set just to spit foo to the logs. Does nothing.
  Any suggestions please? Do I need to assign any permissions to catch the intent?</p>