My app welcomes spike activity, if I don't have specific credentials in my database, it should go to the login page.
Intent intent = new Intent(Splash.this, Login.class); startActivity(intent); Log.d("debug", "code is still executing!!!");
Problem : after my startActivity (), all the code below still executes. ("code still executing" is printed in the console).
Purpose : not to execute any code from the burst activity, go to the input activity.
. startActivity() / , . , , , , .
startActivity()
, finish() , , . , , finish() , , finish(), . , i.e return;, finish().
finish()
return;
:
void finish(), . ActivityResult , onActivityResult().
void finish()
, . ActivityResult , onActivityResult().
. startActivity() - "", , "", onPause(), onDestroy(). : http://developer.android.com/training/basics/activity-lifecycle/starting.html
Android. startActivity() , . , , , , ().