I have created an android application which has two activities, one of them is MainActivity
and the other one is Article
activity
In this application you can open unlimited number of activities. So it's like an article app, inside an article there are also other articles so you can follow unlimited number of articles. Every article opens a new Article
activity.
Now what I want to do is this: When the 10th Article
is opened I want to close the first Article
activity (not MainActivity
).
I have also read this question, but it works only if you have different activities (i.e. ActivityA, ActivityB, ActivityC...).
Is there any way I can do this?