When opening links on Android, it seems to be random as to whether the link will open in a browser or in the application. Links to Google Maps always open in the application while other links (I've tried MS Teams and Instagram) sometimes open in the application and sometimes open in the browser (dependent on what app is showing the link).
The documentation implies that the link will always open in the application, but this is not what I have seen. It appears as though the only reliable way to open your app is to use custom url schemes from a web launcher... which Android OS developers scowl at.
What is the root cause of this uncertainty of whether a link will open in browser or in app?
Do individual apps choose how to handle link clicks? Like can an email application require all links to be opened in browser? Or does the OS have "metrics" that help it decide how to handle a link?