title: AlarmManager/BroadcastReceiver not working
body: <p>I've been trying to setup my first alarm using AlarmManager and BroadCastReceiver as explained here: <a href="http://smartandroidians.blogspot.com.es/2010/04/alarmmanager-and-notification-in.html" rel="nofollow">http://smartandroidians.blogspot.com.es/2010/04/alarmmanager-and-notification-in.html</a></p>
  
  <p>My setup:</p>
  
  <p>AndroidManifest.xml:</p>
  
  <pre><code>&lt;receiver android:name="es.radiopodcastellano.player.SleepAlarm" /&gt;
  </code></pre>
  
  <p>My main Activity onCreate (this code actually resides on a subclass, but to simplify I put it there):</p>
  
  <pre><code>@Override
      public void onCreate(Bundle savedInstanceState) {
              // &lt;Stripped code&gt;
      AlarmManager alarm = (AlarmManager) currentContext.getSystemService(Context.ALARM_SERVICE);
      Intent intent = new Intent(this.getApplicationContext(), SleepAlarm.class);
      PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT);
      alarm.set(AlarmManager.RTC_WAKEUP,(System.currentTimeMillis() + (5 * 1000)),pendingIntent);
  }
  </code></pre>
  
  <p>SleepAlarm.java:</p>
  
  <pre><code>public class SleepAlarm extends BroadcastReceiver {
  
  @Override
  public void onReceive(Context context, Intent intent) {
      Log.d("RPod_SleepAlarm","Alarm!!");
  }
  
  }
  </code></pre>
  
  <p>Output from "adb shell dumpsys alarm" show this, so it seems the intent is being called:</p>
  
  <pre><code>  es.radiopodcastellano.player
  221ms running, 32 wakeups
  44 alarms: flg=0x4 cmp=es.radiopodcastellano.player/.SleepAlarm
  </code></pre>
  
  <p>However, Logcat shows nothing for "RPod_SleepAlarm" tag. What could I be doing wrong?</p>