Why doesn't my flutter deeplinking work? I have assetlinks.json on my server

42 views Asked by At

I'm having trouble testing to see if my deeplinking works on my flutter app. Whenever I try, it always opens mobile chrome to the website I specified.

For some context, this is my build.gradle:

productFlavors {
        staging {
            dimension "default"
            applicationIdSuffix ".staging"
            manifestPlaceholders = [appName: "Recora Staging", recoraScheme: "app-staging.recora"]
        }
        prod {
            dimension "default"
            applicationIdSuffix ""
            manifestPlaceholders = [appName: "Recora", recoraScheme: "app.recora"]
        }
    }

my AndroidManifest.xml

<!-- <meta-data android:name="flutter_deeplinking_enabled" android:value="true" /> is this need? -->
            <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" />
                <data android:host="${recoraScheme}.com"/>
                <data android:host="hello.recora.us" />
                <data android:host="hello.recora.com"/>
                <data android:host="hello.recorahealth.com" />
            </intent-filter>

And this is my assetlinks.json

When I run the following command:

adb shell am start -a android.intent.action.VIEW \
    -c android.intent.category.BROWSABLE \
    -d "https://app-staging.recora.com/classes"   

it just opens the browser in my android emulator.

I've also tried the verification process and get these errors:

adb shell pm get-app-links com.recorahealth.members.staging

  com.recorahealth.members.staging:
    ID: 3fdcb150-de8e-4f3a-bf9a-f6e08f16ea9c
    Signatures: [E9:91:F1:EA:B0:49:AE:A1:1B:F0:24:B6:60:81:F1:E0:AA:BE:76:F8:DD:0E:9B:9E:58:7A:89:28:3C:6B:11:A5]
    Domain verification state:
      hello.recorahealth.com: 1024
      app-staging.recora.com: 1024
      hello.recora.us: 1024
      hello.recora.com: 1024

Is there something I'm doing wrong here?

0

There are 0 answers