Test Your Implementation

This document describes a variety of ways you can test your implementation, from the URLs in your manifest, to Google Search results for the completed app in production.

Test your URLs

When developing the manifest for your app, you can use various tools to help you test URLs.

Lint checks for URLs

When creating your manifest to support URLs to your app, use Android Studio lint version 2.x, which flags syntax errors for your intent filters. It automatically and continuously scans your manifest and raises errors in your manifest.

To manually run syntax checking, select Analyze > Inspect Code from the application menu and check for errors:

  • HTTP URL syntax warnings are highlighted in yellow.
  • HTTP URL errors are indicated by a red underline.
  • All errors appear in the bottom pane of the editor window, for quick access to the line in your manifest.

For more information about configuring lint checks, see the lint documentation for Android Studio and Configuring lint in Android.

Verify URLs open to app activities

There are three different ways to verify that your URLs are opening your app correctly, described in more detail below:

  • URL testing in Android Studio
  • Android Debug Bridge
  • URL QR code testing tool

URL testing in Android Studio

Use the Deep Link Testing feature for Android Studio version 2.x feature to verify that your app can be launched with a specified URL.

  1. In Android Studio, open your project in Android view.
  2. After opening a project, select Run > Edit Configurations and edit your URL testing configuration in the Run/Debug Configurations dialog.
  3. Beneath Android Application, select the module you want to test.
  4. Select the General tab.
  5. In the Launch field, select URL.
  6. In the URL field, click to select from a list of defined URLs.
  7. Or type the URL you want to test, for example, http://example.com/gizmos.

  8. Click OK.
  9. Select Run > Run app or Debug app.
  10. If the Select Deployment Target dialog appears, select a connected device or an emulator, and click OK.
  11. If the link is successful, the app launches in the device or emulator, and displays the app at the specified activity. Otherwise, an error message appears in the Run window.

Android Debug Bridge

Test that your links open your app by using the Android Debug Bridge, where {URL} represents the HTTP URL declared in your app manifest.

      adb shell am start -a android.intent.action.VIEW -d "{URL}" {package name}
    

HTTP URL testing tool

Use the QR code generator to ensure correct formatting and behavior. Enter a HTTP URL in the text box below to generate a QR code that you scan using an Android barcode scanner app. This should open a browser page with a link. When you click on the link on your phone, it should open the HTTP URL you have entered in the text box.

Test public content indexing

Use the following tools to verify that your URLs are showing up in Google Search results.

Preview Search results on Android

Check for crawl errors

A few days after Google indexes your published app, check the Crawl Error reports in Search Console to make sure our systems have accessed your app content. See the Crawl Errors Report documentation for details.

Test personal content indexing

To test the on-device personal content index, go to In Apps in the Google app and search for an item included in your personal content.

To view and validate a list of all the Indexable objects the app is adding to the on-device personal content index, go to Settings > Google on your Android phone and tap Firebase App Indexing from the Developer options section (only available if your phone is in developer mode). Review the list of indexable objects and tap each one to verify the metadata is correct.

Test Gboard stickers

To test your Gboard stickers, open up the latest version of Gboard on your phone. Then, go to the stickers palette and check your stickers in the panel.

Test user action logging

Use the following methods to verify the App Indexing API calls in your app.

Use the Android Debug Bridge

Use the Android Debug Bridge to log and verify data sent in your App Indexing API calls.

  1. Enable the logs:
    Actions
    adb shell setprop log.tag.FirebaseUserActions VERBOSE
    Index
    adb shell setprop log.tag.FirebaseAppIndex VERBOSE
  2. View the logs:
    User Actions
    adb logcat -v time -s FirebaseUserActions:V
    App Index
    adb logcat -v time -s FirebaseAppIndex:V
  3. Launch the app activity that triggers the App Indexing API call.

After that, you can see API calls in the logs.

Use the Android Monitor

If the activity launched by a HTTP URL is integrated with the App Indexing API, you can use the Android Monitor to review the App Indexing API calls. To review the log, change the Android Monitor settings as follows:

  1. Set Log level to Verbose.
  2. Enter FirebaseUserActions in the Search field.
  3. Select No Filters from the Filter drop down list on the right.
    Android Monitor settings

If you don't see App Indexing log entries, do the following:

  • Install Google Play Services on the device or emulator.
  • Verify that the installed Google Play Services version is higher than the version specified in build.gradle.

Test autocompletions

Make sure that query autocompletions appear on those pages that make API calls. To do this, start with a new build of your app and visit a few pages that call the API. Then, visit the Google app on the device and type in a query that is relevant to your app. You should see query results in the list that show your app icon and lead directly to those pages on your app.

Finally: Enhance Search Performance

Send feedback about...

Need help? Visit our support page.