gpt4 book ai didi

android - android的应用程序屏幕如何恢复正在运行的 Activity ?

转载 作者:行者123 更新时间:2023-11-29 01:46:38 25 4
gpt4 key购买 nike

我想知道 android 应用程序屏幕如何恢复正在运行的 Activity ,或者更确切地说,为此使用的 Intent 看起来如何。我已经尝试在 Activity 的 onResume() 中通过 activity.getIntent() 获取“resume-intent”,但看起来 getIntent() 只返回“start-intent”。那么有没有办法获得这个“resume-intent”或者有人知道它是什么样子的吗?

谢谢

最佳答案

根据您在(现已删除)回答中的评论:

I do following: Navigating to the activity -> pressing home button -> click the according launcher-icon on the app screen (what brings me back to my activity). The intent used in this case for resuming the activity is what I'm interested in

在这种情况下,没有发送Intent 来恢复您的Activity。当您启动您的应用程序时,Android 只是将包含您的应用程序的现有任务从后台带到前台,然后恢复位于堆栈顶部的 Activity

关于android - android的应用程序屏幕如何恢复正在运行的 Activity ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21079692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com