Trying to understand why from the search results Google answers to stackovervlow.com immediately open in the application? I want to do the same in my application.

In the documentation, this is very similar to App Links. But for the link to open in the application without questions, an automatic verification is required. I do not find it either in the application (the corresponding fragment of the manifest below) or on the site ( https://stackoverflow.com/.well-known/assetlinks.json returns 404, although I would expect to meet the file there ).

How did they do it?

<activity android:name="com.stackexchange.marvin.ui.LinkDispatchActivity" android:launchMode="singleTask" android:noHistory="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:pathPrefix="/questions/" /> <data android:pathPrefix="/q/" /> <data android:pathPrefix="/a/" /> <data android:pathPrefix="/users/" /> <data android:pathPrefix="/u/" /> <data android:path="/" /> <data android:host="stackoverflow.com" /> <data android:host="meta.stackoverflow.com" /> <data android:host="serverfault.com" /> <data android:host="meta.serverfault.com" /> <data android:host="superuser.com" /> <data android:host="meta.superuser.com" /> <data android:host="stackapps.com" /> <data android:host="askubuntu.com" /> <data android:host="meta.askubuntu.com" /> <data android:host="mathoverflow.net" /> <data android:host="meta.mathoverflow.net" /> <data android:host="*.stackexchange.com" /> <data android:host="pt.stackoverflow.com" /> <data android:host="ja.stackoverflow.com" /> <data android:host="ru.stackoverflow.com" /> </intent-filter> </activity> 

    1 answer 1

    A little bit wrong. This is a Google search feature. To set up a search, first you need App Links, and second, Indexing. See here https://developer.android.com/training/app-indexing/index.html

    By itself, App Links provides the ability to open your and other applications (without autoverify) from any place if they have an action VIEW and category BROWSABLE in the manifest (well, the filter by hosts and schemes is appropriate). In particular, in the same google search there are also regular links to so, for which you can choose in which application to open. Now, if autoverify were set up, as you expected, there would be no choice and everything would open automatically.