阅读背景:

应用程序再次进入前台后的Android登录界面。登录屏幕不是root活动

来源:互联网 

I'm programming a Voting Android Application. After the user has chosen an Election where he wants to make a vote, the user gets redirected to a Login Activity where he has to enter a password. After that, a Ballot Activity gets started and the person can choose some candidates. A requirement in this project is, that if the application leaves the foreground (onPause()) and enters the foreground back later (onResume()), the login screen should return and ask the user for his credentials again. How does one realize that? I saw some solutions at stackoverflow with android:clearTaskOnlaunch="true", but this does only work if the login screen is the root activity, which in my case is not true. Can someone help me out? Thank you.I'm programming a Voting Android Application. A




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: