[英]Back button from my app goes to home screen rather than previous app
I'm trying to debug an issue and I'm not sure what is going on. 我正在尝试调试问题,但我不确定发生了什么。
My application is launched from application A (this is not mine, someone else's, so I don't have any source code) 我的应用程序是从应用程序A启动的(这不是我的,别人的,所以我没有任何源代码)
When I click the back button on my application, I land on the Android home screen rather than going to the application that launch me. 当我单击应用程序上的后退按钮时,我会登陆Android主屏幕,而不是转到启动我的应用程序。 I checked all the flags in the intent that I receive, and everything is turned off.
我检查了收到的意图中的所有标志,一切都被关闭了。
Now if I launch my application from any other application, then pressing the back button goes back to the application that launch me. 现在,如果我从任何其他应用程序启动我的应用程序,然后按后退按钮返回到启动我的应用程序。
I'm not sure how to debug this issue. 我不确定如何调试此问题。 Any ideas?
有任何想法吗?
Application A might call finish()
once the Intent
is sent to start your Activity
. 一旦发送
Intent
以启动您的Activity
应用程序A可能会调用finish()
。 Then the Activity
in application A that started the Intent
to launch your Activity
will go through onDestroy()
and will be removed from the backstack, so when you press the back key you will go to the home screen if the Activity
in Application A was the first Activity
launched by Application A 然后启动
Intent
以启动Activity
的应用程序A中的Activity
将通过onDestroy()
并将从backstack中删除,因此当您按下后退键时,如果应用程序A中的Activity
是应用程序A启动的第一个Activity
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.