如何从 Chrome 中的网页启动 instantapp?

How to launch instantapp from web pages in Chrome?

我开发了我的第一个 Android 即时应用程序,现在可以在 Google Play 上使用。
我想从 Chrome 中的网页调用该应用程序,但它不起作用。

以 Wish (www.wish.com) 为例,我在 Chrome 上尝试了以下 links for Android.

1: <a href="https://www.wish.com/">link1</a>

2: <a href="intent://www.wish.com/#Intent;action=com.google.android.instantapps.START;scheme=https;package=com.google.android.instantapps.supervisor;S.browser_fallback_url=https%3A%2F%2Fwww.wish.com%2F;S.android.intent.extra.REFERRER_NAME=https%3A%2F%2Fwww.google.co.jp;launchFlags=0x8080000;end">link2</a>

但是上面的link都不起作用(点击它们只是导航到Wish的网页,但没有显示即时应用程序),虽然第二个似乎是Google正在使用的在他们的搜索结果页面中。

我还确认可以通过 am 命令启动该应用程序,例如:

am start -a com.google.android.instantapps.START -c android.intent.category.BROWSABLE -d https://www.wish.com/

有人知道如何从网页启动即时应用程序吗?

Android Galaxy S8 上的 7.0
Chrome 对于 Android 60.0.3112.116

我通过在 Firebase 控制台中从 Firebase Dynamics 链接 https://firebase.google.com/docs/dynamic-links 创建动态链接找到了解决此问题的方法。 没有安装应用程序时,可以选择将用户发送到即时应用程序。我从 https://developer.android.com/topic/instant-apps/faqs.html 找到它(在应用程序链接、深度链接和 URL 处理部分)

Like this

对不起我的英语。

只有 Firebase Dynamics Links 可以从 Web 打开免安装应用程序。您可以轻松生成它 manually 但首先检查它在 firebase 控制台中的工作方式。创建测试后,使用 Link 详细信息和 Link 预览 link。

示例Link:

https://firebase.page.link/?link=https://instant.example.com&apn=package_name&afl=https://example.com

清单中的即时应用配置示例:

    <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:host="instant.example.com"
                android:pathPrefix="/"
                android:scheme="https" />
        </intent-filter>

        <meta-data
            android:name="default-url"
            android:value="https://instant.example.com" />
    </activity>