Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

android - Listen for dynamic, universal AND deep links all in one intent filter

I'm wondering if the following intent filter is valid, because so far I can't get asset links verification to work for us (meaning that our universal links still open in the browser).

Here's our intent-filter:

<intent-filter android:label="sqs scheduling links" android:autoVerify="true">
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>

    <!-- This is needed for dynamic links -->
    <data android:host="acuityscheduling.page.link" android:scheme="http"/>
    <data android:host="acuityscheduling.page.link" android:scheme="https"/>

    <!-- Accepts URIs that begin with "https://secure.acuityscheduling.com/admin/scheduling-link-->
    <data
        android:scheme="https"
        android:host="secure.acuityscheduling.com"
        android:pathPrefix="/admin/scheduling-link"
    />

    <!-- Accepts URIs that begin with "https://secure.acuityscheduling.com/appointments/view -->
    <data
        android:scheme="https"
        android:host="secure.acuityscheduling.com"
        android:pathPrefix="/appointments/view"
    />

    <!-- Accepts URIs that begin with "https://www.acuityscheduling.com/instant-link -->
    <data
        android:scheme="https"
        android:host="www.acuityscheduling.com"
        android:pathPrefix="/instant-link"
    />

    <!-- Accepts URIs that begin with "acuityscheduling:// -->
    <data android:scheme="acuityscheduling"/>
</intent-filter>

Our asset links file is hosted and ready: https://www.acuityscheduling.com/.well-known/assetlinks.json

But when installing the app with Android Studio I don't think I see any app link verification logs, and our universal links seem to open in the browser when invoked in a browser tab, or invoke system UI with Chrome and our app as the 2 options (meaning that the link is not verified since it's still asking)

Should I possibly separate that declaration into multiple intent-filters?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...