intent destroy activity code example
Example: how to destroy activity in android
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
finish();
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
finish();