String corruption with alarm manager
===

I have a problem with a text string attached to an alarm. It seems that when the alarm is triggered, the string attached to the alarm is garbage. Clearly I have made a mistake - but don't know where.

My code for setting the alarm is;

	static void set_alarm(long alarm_time_in_millis,Context cont,AlarmManager alarm_manager,String str)
	{
		Intent intent = new Intent(cont, to_call_when_alarm_goes_off.class);
		intent.putExtra("string", str);

		Log.i("xx","set_alarm ["+str+"]");
		PendingIntent pIntent = PendingIntent.getBroadcast(cont,0, intent, 0);

		alarm_manager.cancel(pIntent);

		alarm_manager.set(AlarmManager.RTC_WAKEUP,alarm_time_in_millis, pIntent);
	}

The code for receiving the alarm is as follows:

    public class to_call_when_alarm_goes_off extends BroadcastReceiver
    {
    	Bundle bundle_from_whoever_called_this_activity;
    	
    	@Override
    	public void onReceive(Context arg0, Intent arg1) 
    	{
    		String str;
    		
    		bundle_from_whoever_called_this_activity = arg1.getExtras();

            // The string I get on the following line is not the same as the one sent

    		str = bundle_from_whoever_called_this_activity.getString("string");

    		Log.i("ALARM","to_call_when_alarm_goes_off: TIME TO WAKE UP!!! ["+str+"]");
    		try 
    		{
                Intent i = new Intent(arg0, dingaling.class);
                i.putExtra("string", str);
                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                arg0.startActivity(i);
            } 
    		catch (Exception e) 
    		{
            }
    	}
    }

