开发者

Should app logout to logging screen or home screen?

开发者 https://www.devze.com 2023-02-19 06:10 出处:网络
I am building an app that requires the user to login to get access to their information. Within the app there are four branches all accessible via menu options. W开发者_Python百科hen the user logs in

I am building an app that requires the user to login to get access to their information. Within the app there are four branches all accessible via menu options. W开发者_Python百科hen the user logs in he is placed on the first screen of one of the branches.

I programmed the app so that when the user BACKs to the first screen of any branch, the activity stack is flushed and pressing back again exits the app.

The question: What is the best practice for exiting?

  1. Should pressing back a second time log the user out and return to the login screen.
  2. Or should pressing back log the user out and return the user to the android home screen?

I have seen both ways of doing it and not sure what criteria I should look at to make the proper usability decision.

To clarify the flow:

[Android Home Screen] -> [App Login Screen] -> [Internal App Branch]


I usually capture the Back button, give the user a Toast notification like "Press Back button again to exit". I capture the System.currentTimeMillis and compare subsequent presses for a threshold of 2 seconds or something close to that. I've seen a couple apps do that and it seems pretty intuitive to me.


If the home screen does not require authentication then I would prefer this method. This is a highly subjective question, though. I'm sure there are other people who would disagree with me and say they prefer the log in screen. That's why it's pretty subjective :)

0

精彩评论

暂无评论...
验证码 换一张
取 消