намерение для BroadcastReceiver работает неправильно

Как я могу "очистить" значения из дополнительного намерения?

Activity:

@Override
public void onCreate(Bundle savedInstanceState) {

...

Intent intent = new Intent(this, MyBroadcastReceiver .class);
intent.putExtra("valueOne", "valOne");
intent.putExtra("valueTwo", true);
intent.putExtra("valueThree", 1);

PendingIntent pendingIntent = PendingIntent.getBroadcast(
    this.getApplicationContext(), 234324243, intent, 0);

AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()
    + (5 * 1000), pendingIntent);

...

}

BroadcastReceiver:

@Override
public void onReceive(Context context, Intent intent) {

... 

String valueOne= intent.getStringExtra("valueOne");
Boolean valueTwo= intent.getBooleanExtra("valueTwo", false);
Integer valueThree= intent.getIntExtra("valueThree", 0);

// Log.i("info", valueOne) >> valOne
// Log.i("info", valueTwo.toString()) >> false
// Log.i("info", valueThree.toString()) >> 1

...

}

Если я изменю значение в Activity и запущу приложение снова, я получу те же значения, что и при первом запуске. Пробую удалить приложение с телефона/виртуальной машины, чищу проект, но проблема остается :(

Кто-нибудь поможет?

0
задан Kolesar 13 January 2012 в 12:44
поделиться