These are my two lines of code that don't launch my MainActivity
. There is not error and the app does not crash. It's like these two lines of code are effectively commented out.
Intent intent = new Intent(MainActivity.mMainActivity,MainActivity.class);
MainActivity.mMainActivity.startActivity(intent);
I initialize mMainActivity
like this in MainActivity
public static MainActivity mMainActivity;
//...
mMainActivity = this;
I am trying to launch MainActivity
from a non-activity class.
What is wrong? Thanks.