I have two Android notifications that get started from my main (not at the same time) and each with a different string in the title field. When creating each of them, I set them up to open to another activity called ResultActivity with a textView. I then want to set the textView to say the string in the title field from the notification. I feel like I had it working, but I’m testing it now, and the newer activity always has it’s title set, no matter which on you click. Hope that makes some sense.
Snipet from my main:
resultIntent.putExtra("title", pass);
Snippet from ResultActivity.java:
title = getIntent().getStringExtra("title");
The code works, but when I have more than one notification, it seems like the .putExtra("title", pass) get’s overridden. Does anyone know if that’s how it works?
You must make the pending intents differ more than in extras. If they are otherwise equal, the system will treat them as the same.