2

我收到一个关于 gmail 的链接,我想在我们点击该链接时打开我的应用程序。如果我单击该链接,它会在网站中打开(而不是在应用程序中),但如果我复制该链接并在浏览器中打开它,它会给我一个选择应用程序的选项。

<intent-filter android:label="@string/app_name">

            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="agora-frontend.herokuapp.com"
                android:scheme="https" />

        </intent-filter>
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="agora-frontend.herokuapp.com"
                android:scheme="http" />

        </intent-filter>
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="agora-frontend.herokuapp.com"
                android:scheme="app" />

        </intent-filter>

我要打开的链接是 https://agora-frontend.herokuapp.com/vote/xxxxxxxxxx/xxxxxxxxxxxxxxxxxxx

每当我们通过gmail单击该链接时,我都想打开我的应用程序。

4

0 回答 0