About the App Links Assistant in Android Studio: A developer’s guide

For developers building Android apps intended for Web to App and App Engagement campaigns, ensuring deep links are correctly implemented and validated is crucial. Android Studio, the official Integrated Development Environment (IDE) for Android, provides a dedicated tool called the App Links Assistant. This assistant streamlines the process of creating, testing, and troubleshooting deep links, specifically for the Android Manifest configuration and the necessary website association files (assetlinks.json).

This article details how you can use the App Links Assistant to ensure your app's deep links are robust and ready.

On this page


Benefits of using the App Links Assistant

  • Greater accuracy and efficiency: Helps you reduce manual errors in configuring intent filters and assetlinks.json files and automates parts of the validation and fixing process.
  • Comprehensive checks: Helps you validate against Android platform requirements for deep links and app links.
  • Centralized management: Provides a single interface within Android Studio to oversee and manage your app's deep link setup.

How the App Links Assistant works

The App Links Assistant is a bundled plugin within Android Studio designed to simplify the complexities of deep link implementation for Android apps. It helps you manage both the app-side configuration (in the AndroidManifest.xml file) and the website-side verification (the assetlinks.json file) required for functional deep links, especially Android App Links (which use http and https schemes).

Key features of the App Links Assistant

The App Links Assistant offers several features to help you manage and validate deep links:

  • Discovering existing deep links: The assistant scans your app's AndroidManifest.xml file and displays a table that lists all detected deep link patterns (intent filters configured to handle URLs). This gives you a quick overview of all entry points into the app through URLs.
  • Validating Android Manifest configuration (App checks): Automatically analyzes each discovered deep link for common configuration issues within the manifest. This includes checking for:
    • Presence of required <data> tag attributes like android:scheme, android:host
    • Correct intent actions like ACTION_VIEW
    • Necessary categories like BROWSABLE, DEFAULT
    • The autoVerify="true" attribute for Android App Links
  • Fixing Manifest issues: For many common manifest misconfigurations, the App Links Assistant provides "Fix" buttons that can automatically correct the issues in your AndroidManifest.xml file. If an issue can’t be automatically fixed, the assistant will guide you to the relevant section of the manifest for manual correction.
  • Validating web associations (assetlinks.json) (Web checks): The assistant helps verify that your website is correctly set up to associate with your app, which is crucial for Android App Links (http/https URLs). It checks the following:
    • File existence and location: Ensures the assetlinks.json file is present at https://your-domain.name/.well-known/assetlinks.json.
    • HTTPS accessibility: Confirms the file is served over a secure HTTPS connection.
    • JSON validity and content: Verifies the assetlinks.json file is well-formed and contains the correct statements, including your app's package_name and sha256_cert_fingerprints.
    • Content type header: Checks that the server serves the file with the application/json content type.
    • No redirects: Ensures the file is accessible directly without any HTTP 301 or 302 redirects.
  • Generating and managing assetlinks.json:
    • Generation: If you don't have an assetlinks.json file, or if yours is incorrect, the assistant can help generate a properly formatted one.
    • Different view: Check a comparison between existing (fetched) assetlinks.json file and a corrected or newly generated version, making it easy to check what changes are needed.
    • Download: The corrected assetlinks.json file can be downloaded directly from the assistant, ready to upload to web servers.

How to use the App Links Assistant

While specific steps might vary based on the task, here’s a general workflow of how to use the App Links Assistant.

  1. In Android Studio, navigate to View.
  2. Select Tool Windows and then App Links Assistant or Tools.
  3. Select App Links Assistant.
  4. Review detected deep links.
    • The assistant will display all deep links found in your project's manifest.
  5. Run app checks.
    • Initiate validation for the Android Manifest configurations. Review any reported errors or warnings.
  6. Fix Manifest issues.
    • Use the "Fix" options for automatic corrections or manually edit the manifest based on the assistant's guidance.
  7. Run web checks for Android App Links.
    • For http/https links, initiate the web association validation. The assistant will attempt to fetch and analyze the assetlinks.json file from the domains specified in your manifest.
  8. Review web check results.
    • Address any issues reported, such as problems with the assetlinks.json file's content, hosting, or accessibility.
  9. Generate or update assetlinks.json.
    • If needed, use the assistant to generate a new assetlinks.json file or to check a diff and download an updated version. Upload this file to the /.well-known/ directory on all relevant domains.
  10. Revalidate.
    • After making changes to your manifest or assetlinks.json file, re-run the checks in the App Links Assistant to confirm all issues are resolved.

Related links

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
18339876764233171749
true
Search Help Center
true
true
true
true
true
true
73067
false
false
false
true
false