Android intent extra data is lost
The problem is the android:launchMode="singleTask"
attribute of the receiving task. With this being set, all intents that target the ActivityTo
activity are received by the same object. In case the activity was already created, the intent is sent through the activity's onNewIntent(Intent)
method. Override it like this:
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
This way, you can get the new intent with the getIntent()
.