Following procedure:
- Start my application, Stack: [HomeActivity]
- Going to Facebook, using a deep link to get into Activity X
- Pressing back button results in getting back to HomeActivity instead of Facebook
Expected
- Start my application, Stack: [HomeActivity]
- Going to Facebook, using a deep link to get into Activity X
- Pressing back button results in getting back to Facebook App
I get the expected behavior when my application is not started at all beforehand. I see that other apps like Instagram does managed to get this working properly. So even if your application is running in the background it takes you back to the activity which issued the deep-link intent.
My activity has launchMode="singleTop"
, onBackPressed()
is not overriden, so it calls the super class implementation.
What am I missing here to get this right?
I debugged it and onBackPressed()
eventually calls finish()
, yet it gets me back to my application instead of Facebook.