title: Trouble sending Bundle with PendingIntent to a Broadcast Receiver, data lost
body: <p>I am adding some basic alarm functionality to my program via the use of AlarmManager and a BroadcastReceiver class (named AReceiver.java).  My problem is that the data I add to the bundle attached to the Intent creating the PendingIntent appears to be lost.  The only bundle data I can access in the AReceiver class is a android.intent.extra.ALARM_COUNT=1.</p>
  
  <p>Here is the basic code in the main activity class creating the Intent, PendingIntent and the AlarmManager:
  [Code in main activity - Notepadv3]</p>
  
  <pre><code>Intent intent = new Intent(Notepadv3.this, AReceiver.class);         
  intent.putExtra("teststring","hello, passed string in Extra");               
  PendingIntent alarmIntent = PendingIntent.getBroadcast(this, pendingPeriodIntentId, intent, 0);     
  AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);           
  am.set(AlarmManager.RTC_WAKEUP, timeOfNextPeriod.getTimeInMillis(), alarmIntent);
  </code></pre>
  
  <p>[Code in the BroadcastReceiver - AReceiver]</p>
  
  <pre><code>public void onReceive(Context con, Intent arg1) {
  Bundle extrasBundle = arg1.getExtras();
  Log.d("broadcast","contains teststring = " + extrasBundle.containsKey("teststring"));
  Log.d("broadcast","is empty? = " + extrasBundle.isEmpty());
  Log.d("broadcast","to string = " + extrasBundle.toString());
      }   
  </code></pre>
  
  <p>Debug messages say that contains teststring is FALSE, is empty is FALSE and when outputting the whole bundle, I get the android.intent.extra.ALARM_COUNT=1 value.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Cheers,
  Tom</p>