App Indexing Implementation for Android Applications
App Indexing is a mechanism that allows Google to index content within Android applications and show it in search results. The user searches on Google—sees a result with a deep link to your application, taps—goes straight to the needed screen. If the application is not installed—redirect to the web version.
Technically, this is a combination of two things: App Links (domain verification for reliable deep links) and Firebase App Indexing SDK (activity indication for personalized search results).
App Links and Domain Verification
Without App Links, Android shows a disambiguation dialog ("Open via..."). With App Links, the system opens your application immediately, bypassing the dialog.
Manifest:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="yourdomain.com" android:pathPrefix="/products/" />
</intent-filter>
android:autoVerify="true" triggers verification on install: the system requests https://yourdomain.com/.well-known/assetlinks.json. If the file is unavailable or incorrect—verification fails, the dialog returns.
assetlinks.json must contain the SHA-256 fingerprint of the APK signing certificate. Debug and release—different certificates. When using Play App Signing, use the fingerprint from Google Play Console, not the local keystore.
Common mistake: the assetlinks.json file is served with Content-Type: text/plain instead of application/json, or protected by authorization, or redirects with www. Android verification doesn't follow redirects.
Firebase App Indexing SDK
FirebaseAppIndex.getInstance(context).update(
Indexable.Builder("Article")
.setName(article.title)
.setUrl("https://yourdomain.com/articles/${article.id}")
.setDescription(article.summary)
.put("keywords", article.tags.joinToString(","))
.build()
)
setUrl() is the same URL as in App Links. Google indexes it and shows it in search.
Index when the user views content. For batch indexing—in a WorkManager task on first launch or content update. Don't index the entire catalog at once in onCreate()—this slows down startup.
App Indexing History. FirebaseUserActions.getInstance(context).start(action) / end(action) logs user actions for personalized Siri (Google Assistant) suggestions. Action.Builder(Action.Builder.VIEW_ACTION).setObject(title, url). Start—when opening content, End—when closing.
Handling Deep Link
class ArticleActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
handleIntent(intent)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
handleIntent(intent)
}
private fun handleIntent(intent: Intent) {
val action = intent.action
val data = intent.data
if (Intent.ACTION_VIEW == action && data != null) {
val articleId = data.lastPathSegment
viewModel.loadArticle(articleId)
}
}
}
onNewIntent is needed if the Activity is launched with launchMode="singleTop" or singleTask—otherwise, a repeated deep link won't be processed.
Web vs App: Content Linking
For correct Google indexing, content by URL in App Links must match web page content. The page should contain meta tags:
<link rel="alternate" href="android-app://com.yourapp/https/yourdomain.com/articles/42">
Without this link, Google may index the web version but not know about the application.
Testing
adb shell am start -a android.intent.action.VIEW \
-d "https://yourdomain.com/products/123" com.yourapp
Check App Links verification: adb shell pm get-app-links --user cur com.yourapp—should show verified for your domain.
Google Search Console → Mobile Usability → App Indexing shows indexing status.
Timeline
App Links + basic App Indexing: 2–3 weeks. Full integration with Firebase App Indexing, batch indexing, Google Assistant actions: 4–7 weeks. Cost depends on content volume and deep link scheme complexity.







