There is home icon on app's app bar at top and I want to finish all activities and take user to home page. But, I don't want home page to be re-created.
I have already tried following but it re-creates home page and I don't want it
fun goToHomePage() {
val homeIntent = Intent(activity, HomeActivity::class.java)
homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
startActivity(intent)
}
<activity
android:name="HomeActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"/>
Re-creating home put pressure on our backend and we don't want that. How to do achieve it?