I am trying to determine upon startup whether the in-app has been purchased, this is my current code;
if (!(getSharedPreferences("purchased", 0).getBoolean("purchased", false)))
admob();
Log.d("NOT UPGRADED", "SHOW AD AS UPGRADED ALREADY");
if (!(getSharedPreferences("purchased", 0).getBoolean("purchased", true)))
admobskip();
Log.d("UPGRADED", "DO NOT SHOW AD AS UPGRADED ALREADY");
But it appears to run through all that code, rather than checking, with iOS I use if / else , however I seem unable to use that and wanted the java equivelent for this piece of code if possible? I have swapped the purchased to 'true' on the second half of statement.
Log.dstatements are not part of the if statements, so they are always executed.{ ... }scope