I want to determine which value has been sent by different buttons that I have in my code. I have tried the code below. Thanks in advance!
if (intent.getExtras().getString("") == button1value){
}
I want to determine which value has been sent by different buttons that I have in my code. I have tried the code below. Thanks in advance!
if (intent.getExtras().getString("") == button1value){
}
You can't compare two strings with ==
.
if (intent.getExtras().getString("").equals(button1value)) {
}