user445338
user445338

Reputation:

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)

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. 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?

Upvotes: 0

Views: 1284

Answers (1)

Emmanuel
Emmanuel

Reputation: 13233

Application A might call finish() once the Intent is sent to start your Activity. 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

Upvotes: 2

Related Questions