I have an app on a startup that performs 3 checks (everything happens in a separate file called "Application"): first for an internet connection, then for the internet connection type, and lastly, for the apps permission to start main activity.
All 3 checks pass correctly, however, on the last pass I get in a string value "False", which is fine, but in the splash screen when I want to check that value, it does not work. I did set if block if the value is false to launch another acitivty, but it does not, it just ignores that block.
Here is the code:
public void onCreate(Bundle savedInstanceState) {
setFullScreen();
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_activity_init);
if(APP.connectionCheck(InitActivity.this) == "TRUE"){
JSONObject JOBJC = APP.getJSON(APP.defaultUrl());
String result = APP.checkPermission(JOBJC);
if(result=="false"){
Intent i = new Intent(this,app.pcg.notation.Notation.class);
startActivity(i);
finish();
}else if(result=="true"){
}
}else{
Intent i = new Intent(this,app.pcg.notation.Notation.class);
startActivity(i);
finish();
}
}