简体   繁体   English

我的应用程序的后退按钮进入主屏幕,而不是以前的应用程序

[英]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.

相关问题 后退按钮不会带我去之前的活动,而是主屏幕 - back button not taking me to previous activity, rather home screen 片段中的“后退”按钮返回到主屏幕 - Back button in fragment goes back to Home screen 主页按钮带回我的应用程序 - Home button brings back to my app 当应用程序从主页按钮转到后台时,LifetimeChanged事件不会触发 - LifetimeChanged event not firing when app goes background from Home button 如果我不想关闭我的应用程序,如何从后退或主页按钮中生存 - how to survive from back or home button in an ANDROID APP if I don't want to close my APP 单击“后退”或“主页”按钮时,应用程序将返回活动的父级,但并不总是调用onStart() - When clicking back or home button, app goes back to activity's parent but onStart() isn't always called 有人可以告诉我为什么在应用程序中按“后退”按钮总是将我带回到主屏幕吗? - Can someone please tell me why hitting the back button in my app always takes me back to the home screen? 当用户返回到多活动应用程序的主屏幕时,停止IntentService - Stop IntentService when user goes back to home screen in multi-activity app 如何在按下“后退/主页”按钮时阻止我的应用退出? - How to stop my app from exiting when back/home button button is pressed? 从通知返回上一个应用程序而不是主屏幕 - Return to previous app instead of home screen from Notification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM