App Indexing is definitely one of the more heavily underrated features of Firebase. Perhaps, because people don’t know what it does.
Your app might be sitting quietly in a user’s app drawer, almost forgotten. Along the line, they might Google search for content your app delivers. When this happens, a card pointing to your app will be shown to the user to bring the user to your app directly to the activity and content your user is looking for, thanks to app indexing.
Image taken from the official site
So you guessed it. This is a re-engagement tool, ensuring your users get the most out of your app.
How does it work? If your site and your app have similar content, your app can take incoming links from the same search. Not only that, but the correct activity in your app will be launched directly based on how you define intent filters in your app.
Upload assetlinks.json to your website
"target" : "namespace": "android_app",
"sha256_cert_fingerprints": ["hash_of_app_certificate"] }
Edit your Android Manifest
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "https://recipe-app.com/recipe" -->
Note the autoVerify attribute. Upon installation of your app, due to autoVerify’s presence, the system will attempt to verify all hosts associated in those intent filters, therefore making your app into the default handler for those links.
Short as this was, it doesn’t take much to get App Indexing running well in your app. It’s a very useful tool to have to keep your users well engaged with your app, especially if your app’s been left sitting quietly in the app drawer.
This time, on top of the official docs, the examples here were taken from this video on the Firebase YouTube channel. Their videos there are amazing and definitely worth checking out.