Is this the right way to get started?

Intent nnn = new Intent(Hello.this, NewActivity.class); startActivity(nnn); finish(); 

This will start a new action and then close the current activity forever , right?

+4
source share
2 answers

Yes. the end must cease action. OnDestroy () happens when it is called.

http://developer.android.com/reference/android/app/Activity.html#finish%28%29

+3
source

Yes, Calling finish () should stop your current activity and start a new activity.

+1
source

Source: https://habr.com/ru/post/1301437/


All Articles