I am trying to develop an android app which supports from 2.3 and above to the latest version. and it is session based. Scenario: My app as a login activity and on successful login it starts the A activity and further activities can be started like A activity->B activity->C activity. My question is: when I am in C-activity and if session expires(Session expiry is from the server side),I need to close all the activities in the task and start a new Login activity.
I tried using FLAG_ACTIVITY_CLEAR_TASK (but this flags supports from 3.0).please help me with a solution.