I have an activity that has an EditText. After a user enters their text, the app may use that text later to make a notification. I can set the notification text just fine, but when the user clicks on the notification, it launches a dialog box that should have the same text. I have tried putExtra with the PendingIntent but that only displays the latest text in the dialog no matter which notification was selected. Is there a way to assign each string from the EditText a number and have the dialog load the text from what number it is?
Share
try following logic,
make one static string variable,
at the time of EditText input, just store its value ion to strEditText variable like below,
Now make one public static method, like below,
Now you can have this variable’s value throughout whole project.
You can also try another method in android,
pass your arguments in
Bundle