I have a piece of code here that theoretically should work, but in fact it doesn't.
Extras = getIntent().getExtras();
if(Extras!=null)
if(Extras.getString("startup")!=null)
StartUp = Extras.getString("startup");
else
StartUp = "0";
prefs = this.getSharedPreferences("runonstartup", 0);
start.setChecked(prefs.getBoolean("yesorno", false));
Toast.makeText(getApplicationContext(), "Start-up: "+StartUp+"\nChecked: "+String.valueOf(start.isChecked()), Toast.LENGTH_LONG).show();
if(StartUp=="1"&&start.isChecked())
{
new PostTask3().execute("testing");
}
The toast there shows: Start-up: 1 and Checked: true. Yet "if" fails to evaluate the expression as true and run PostTask3.
Help ... ?