0

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?

BobtheMagicMoose
  • 2,246
  • 3
  • 19
  • 27
  • Not sure if you've read: [What is an Intent in Android?](https://stackoverflow.com/q/6578051/295004) as that is the mechanism by which distinct operations can be performed. – Morrison Chang Apr 19 '22 at 22:47
  • I have read similar items. My understanding is that the app is just registering that it can handle a URL and it is entirely up to the whims of the OS as to whether or not it will allow it to? Does the originating app (the one presenting the link) have a say as well? This results in url schemes being the only definitive way to launch an app... – BobtheMagicMoose Apr 20 '22 at 00:29
  • 1
    Originating app can [specify the app package](https://stackoverflow.com/q/27884457/295004). See: https://developer.android.com/training/package-visibility/use-cases for additional guidance – Morrison Chang Apr 20 '22 at 01:10

0 Answers0