0
My problem is this... I have 3 Activitys:
(Activitya), (Activityb) and (Activityc)
From Activitya to Activityb I do the following:
val intent = Intent(this, ActivityB::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
startActivity(intent)
finish()
from Activityb to Activityc I also do the same thing:
val intent = Intent(this, ActivityC::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
startActivity(intent)
finish()
It turns out that if I give onBackPressed or go to any other App and return to my App instead of going back to Activityc as expected I always return to Activitya!!!!!!