In my
onCreate
I am setting
myString = getIntent().getStringExtra("sentString");
and after that
if (myString == "test") {...}
fails to execute...
even though afterwards
btnTest.setText(myString);
Works
What is the problem?
Always use String.equals() when comparing strings. The == will just compare the reference.
Example: instead of
if (myString == "test") {...}
use:
if (myString.equals("test")) {...}