MainActivity --(starts)--> LoginActivity--(if login success)-->MainActivity (with updated data).
I want to finish LoginActivity then start MainActivity with layout login successfull
I've tried with this code :
Intent intent = new Intent(Synchronization.this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);
this.finish();
but it's not working properly. Any ideas how to get the things to work properly?