title: Send data to the alarm manager broadcast receiver
body: <p>I am missing something here and I hope someone can help me out. I am setting up an alarm using the following:</p>
  
  <pre><code>    AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
  
      Intent broadcast_intent = new Intent(this, AlarmBroadcastReceiver.class);
      PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0,  broadcast_intent, 0);
  
      broadcast_intent.putExtra("test", "ValueReceived"); //data to pass
      Date date = someVariable.getDateTime();
  
  
      long triggerAtTime = date.getTime();
  
      alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtTime, pendingIntent);
  </code></pre>
  
  <p>and the broadcast receiver using the following:</p>
  
  <pre><code>public class AlarmBroadcastReceiver extends BroadcastReceiver{
  
      @Override
      public void onReceive(Context context, Intent intent) {
  
          Toast.makeText(context, "Alarm has been received "+intent.getStringExtra("test"), Toast.LENGTH_LONG).show();
  
      }
  
  }
  </code></pre>
  
  <p>However intent s apperently "empty". I am seeing null value for the getStringExtra. So the data is not being passed to the broadcast receiver. What am  I doing wrong? How can I pass data.</p>
  
  <p>Thank you so much</p>