在Android Lifecycle中,当从最近的应用列表中刷新应用时,是否有任何唯一的方法?
在Android Lifecycle中,当应用程序从最近的应用列表中刷卡时,是否有任何独特的方法可以调用?我们最初认为我们会使用Ondestroy,但在其他活动中也会被调用。
In android lifecycle, is there any unique method that gets called when the app is swiped from the recent app list? We initially thought we would use onDestroy but it gets called during other activities as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加下面的服务并开始。当应用关闭OnTaskRemaved运行您的代码时。
清单
服务类
Add a service like below and start it. When app close onTaskRemoved run your code.
Manifest
Service class