简体   繁体   English

Android:如果在后台经过一定时间,则退出应用程序

[英]Android : Exit the application after certain interval of time if its in background

I want to close my application after certain interval of time it its in background. 我想在后台关闭某个时间间隔后关闭我的应用程序。 I found many examples to close the application in background and about how to know if application is in background but i didn't find anything related to this. 我发现了很多示例在后台关闭应用程序,以及如何知道应用程序是否在后台,但是我没有找到与此相关的任何信息。

I want to implement something like auto Logout feature like session, if there is no interaction with application then after specific time of interval is should closed. 我想实现类似自动注销功能(例如会话)的功能,如果没有与应用程序的交互,则应在特定时间间隔后关闭。

Any idea and suggestion will be appreciated. 任何想法和建议将不胜感激。

Thanks 谢谢

It's about application idle, please check here . 有关应用程序空闲的信息,请在此处检查。 There you should find something useful. 在那里您应该找到有用的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM