title: Android AlarmManager set function doesn't work?
body: <p>I want to add an alarm, so I used the following code:</p>
  
  <pre><code>    public void SetAlarm(Alarm alarm)
  {
      mTimeTarget = PendingIntent.getBroadcast(mContext, alarm.getRowID(), 
              new Intent(HomeScreen.ACTION_CHECK_TIME_ALARMS), PendingIntent.FLAG_UPDATE_CURRENT);
      mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, alarm.getAlarmTime().toMillis(true), mTimeTarget);
  }
  </code></pre>
  
  <p>But this doesn't seem to work. (I tried on the emulator, and when the time
  comes, nothing happens - my onReceive function on my class that extends BroadcastReceiver isn't called).</p>
  
  <p>Here is how I initialized mAlarmManager on the constructor (it is private because this class is singleton):</p>
  
  <pre><code>    private AlarmsManager(Context con)
  {
      mContext = con;
  
      mAlarmManager = (AlarmManager) con.getSystemService(Context.ALARM_SERVICE);
  }
  </code></pre>
  
  <p>Any idea what I did wrong?
  Thanks!</p>