3 Replies - 1449 Views - Last Post: 30 April 2012 - 07:58 PM

#1 jvdubn  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 52
  • Joined: 08-June 11

Which Activity do I need

Posted 29 April 2012 - 08:26 PM

So Im new to activities. I have an app that the user logs in to A1 and then can go to A2 ...
when they go to home or any where else and come back, I want it to go to the log in. With this being said I need to 'log them out' when they go to leave or go to the home screen when they resume. can someone direct me to the correct activity. I have looked at the flowchart, but im still unsure about the code
http://developer.and...p/Activity.html

This post has been edited by jvdubn: 29 April 2012 - 08:27 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Which Activity do I need

#2 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 123
  • Joined: 30-November 11

Re: Which Activity do I need

Posted 30 April 2012 - 03:51 PM

onstop()
Was This Post Helpful? 0
  • +
  • -

#3 jvdubn  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 52
  • Joined: 08-June 11

Re: Which Activity do I need

Posted 30 April 2012 - 04:19 PM

so ive seen how to stop and activity but I want the user to go back to the beginning. Is there an easy way to have all activities quit.
A couple of places say to close each activity along the way and each one seems to have a different take on how to do this. Im confused, any more insight :helpsmilie:
Was This Post Helpful? 0
  • +
  • -

#4 jvdubn  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 52
  • Joined: 08-June 11

Re: Which Activity do I need

Posted 30 April 2012 - 07:58 PM

I ended up using:
android:noHistory="true"
in the manifest


http://developer.and...ent.html#nohist

Quote


Whether or not the activity should be removed from the activity stack and finished (its finish() method called) when the user navigates away from it and it's no longer visible on screen — "true" if it should be finished, and "false" if not. The default value is "false".
A value of "true" means that the activity will not leave a historical trace. It will not remain in the activity stack for the task, so the user will not be able to return to it.



seems to be working as desired
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1