how to finish two or more activites created by parent activity in android
<p>i am creating an app in which Activity A creates Activity B and Activity A goes to Background and activity B in Foreground..</p>

<p>when back is pressed in activity B then Activity A comes to foreground and Activity B to background..
Now Activity A creates Activity C again Activity A in background and Activity C in foreground..
I.e now C is foreground and activity A,B are in Background</p>

<p>when back is pressed in activity C then Activity A comes to foreground and Activity C to background..</p>

<p>I.e now A is foreground and activity C,B are in Background</p>

<p>now if Back is pressed in Activity A den i should finish All activities i.e A,B,C and should close the app...</p>

<p>how to implement this can any one help me out..</p>
