Once a user signs out (from the preferences), the handler signs the user out and them takes them to the initial launch page.
The only problem is the user can hit the ‘back’ button which takes them to the other activities where they can see the info from the logged in person. What i want to do is make it work like someone has just opened the app for the first time when they have signed out.
I’ve tried to send the intent of starting the activity with ‘FLAG_ACTIVITY_CLEAR_TOP’ and ‘SINGLE_TOP’ flags but it doesn’t seem to work.
Thanks
Try the FLAG_ACTIVITY_CLEAR_TASK option.
EDIT: just noticed that this is only in API 11. You’ll probably need to do something like registering a BroadcastReceiver in all your Activities, then on the logout screen send an Intent that the BroadcastReceiver will catch. The Activity can then cleanly exit.