Get Started

To get public and personal content from your app into users’ search results in the Google app, start by setting up your app URLs and adding the Firebase App Indexing library.

Add Firebase and the App Indexing library

Although you don’t strictly need Firebase to get your app's public content indexed by Google, the App Indexing API can help you get more out of Search.

  1. Add Firebase to your Android project.
  2. To add the App Indexing library to your project, go to your app's build.gradle script and add the following dependency:
    dependencies {
      // To avoid errors, use the same Firebase SDK version across your app.
      compile ''

Support links to your app content

Structure your website and app so the URLs that point to pages on your site are the same URLs that point to views in your Android app. Google Search crawls your site for these links, then uses them to send users directly to your app.

For example, consider the simple website from the App Indexing codelab. The links in the app are the same HTTP URLs used on the website and follow a clear structure that matches page types to app view types. Follow this type of structure in your app and website.

The sample has two page types (for recipes and notes), but you could have many more page types on your site, each with a distinct link type. For example, includes the following link types:

  • Recipe Pages:*
  • Note Pages:*/note
  • But it could also include Cooking Class pages, using the following link types:

  • Cooking Class Registration Page:
  • Cooking Class Schedule Page:

Note that personal content added to the on-device index does not need a corresponding webpage. Adding personal content to the on-device index for appearance in autocomplete suggestions and In Apps searches is covered in Enable Personal Content Indexing.

To streamline your work, understand the number and types of links you'll need to support before you start building your app. Also make sure you create good titles and descriptions for your pages.

Once you've defined your structure and start creating screens in your app, remember to provide proper back navigation. Users should return to the previous screen if they tap the back button after opening a link.

Next: Enable Public Content Indexing

Send feedback about...

Need help? Visit our support page.