Prevent apps from opening in context of other apps I really dislike the "feature" where apps can open other apps "inside" their own context.  For example, I have a GitHub browser app that has registered the GitHub domain with my phone. When I click on a GitHub link from Chrome, the GitHub browser app opens by itself and is separately closeable (this is good). However when I click on a GitHub link from Yahoo Mail, the GitHub browser app is opened within Yahoo Mail, and it's not separately closeable (bad).

Is there a setting where I can direct my phone to only open apps directly, preventing the behavior I see in Yahoo Mail?
Apps can launch other apps' activities inside their task. This makes
  it impossible to switch back and forth between the two.


In that case you may use an Xposed module ActivityForceNewTask (You need   Xposed Framework installed as well as root)

This module sets the FLAG_ACTIVITY_NEW_TASK flag when starting a new activity, which 'fixes' that.

It basically forces activities launched within applications to create a new task, allowing for much easier switching between the two. In this case if you click on a GitHub link from Yahoo Mail, the GitHub browser app is not opened within Yahoo Mail but as a seperate task with its own window, and it's separately closeable.



Here is an illustration, showing how the module addresses the problem in  question:


Credits: https://forum.xda-developers.com/xposed/modules/mod-activityforcenewtask-t2646504