Search code examples
javaandroidandroid-studiokotlinandroid-deep-link

Android Deep Linking - Verify App links with website


I am trying to enable deep linking with my app
I need when I scan the QR from outside my app like using QR Scanner app or using QR scanner in the system, and when I choose the web browser and search with the link, it directs to my app
I added the code to manifest like this image:

enter image description here

and when I searched with https://domain.ex/.well-known/assetlinks.json

enter image description here

and searched with https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://domain.example&relation=delegate_permission/common.handle_all_urls

enter image description here

what is the error I had made?

I am running one release mode and SHA256 is from google play console.

expected behaviour is: when I search with https://domain.example/pathPrefix it direct to my app


Solution

  • I think need to add scheme separately

    <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="http" />
        <data android:scheme="https" />
    
        <data
            android:host="yourdomain.com"
            android:pathPrefix="/prefixpath/" />
    
    </intent-filter>
    

    If the above steps don't work, please try changing the name of the website in the URL given below, which will show you the SHA256 key google has been cached.

    https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://www.your-website-name.com&relation=delegate_permission/common.handle_all_urls

    See this How to force Google to refetch .well-known/assetlinks.json in order to fix my Android App Link implementation