title: How do I use the intent action USER_PRESENT?
body: <p>I have a clock widget application, and I need to recognize when the phone has been unlocked or not, I believe I can use action USER_PRESENT for that, but I can't get it to launch in the BroadcastReceiver class, I set it in the manifest like this:</p>
  
  <pre><code>    &lt;receiver
          android:name="com.myApp.myApp.MyWidgetIntentReceiver"
          android:exported="false"
          android:label="widgetBroadcastReceiver" &gt;
          &lt;intent-filter&gt; 
              &lt;action android:name="android.intent.action.USER_PRESENT" &gt;
              &lt;/action&gt;                               
          &lt;/intent-filter&gt;
  
          &lt;meta-data
              android:name="android.appwidget.provider"
              android:resource="@xml/demo_widget_provider" /&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p>And this is how I trying to get it in the BroadcastReceiver:</p>
  
  <pre><code>public class MyWidgetIntentReceiver extends BroadcastReceiver{
  
      public void onReceive(Context context, Intent intent) {
          if(intent.getAction().equals(Intent.ACTION_USER_PRESENT){
              Log.i("TICK", intent.getAction());          
          }
      }
  
  }
  </code></pre>
  
  <p>It's not firing after I unlock the phone, can you help me out or provide me a better way to check when the phone has been unlocked? thanks!</p>