Google Chrome无法在Android上的Deep Link上打开应用程序

Sac*_*hin 4 android google-chrome deep-linking android-intent

谷歌浏览器不会在Deep Link上启动我的应用程序,但是,如果我从Firefox运行该应用程序,它就会启动.我使用"onkat://"作为示例,因为我只想先启动应用程序.

以下是我的AndroidManifest.xml中的代码

<activity
            android:name="MainActivity"
            android:configChanges="keyboardHidden|screenSize|orientation"
            android:icon="@drawable/something"
            android:label="@string/appName"
            android:launchMode="singleTask"
            android:screenOrientation="user" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

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

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

                <data android:scheme="onkat"/>

            </intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?如果Google Chrome在Intent过滤器中需要更多内容?或解决方法.我在多个设备上测试过,除了Chrome,其他浏览器在我输入"onkat://"时运行我的应用程序

观察:我认为Google Chrome一般不适用于Deep Link.甚至Facebook深层链接也不起作用,而它适用于其他浏览器(fb://).此外,谷歌浏览器Deep Link不适用于iOS

Mar*_*k B 6

Chrome已更改其处理从Chrome浏览器应用启动的意图的方式.

<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

答案可以在这里找到:https://developer.chrome.com/multidevice/android/intents

  • 从Chrome浏览器开始,即使安装了应用程序,也始终打开google playstore. (6认同)

Jam*_*mal 6

在清单文件中,您的意图过滤器应如下所示:

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

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

            <data
                android:host="productlist"
                android:path="/"
                android:scheme="westwing" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

在浏览器端应该是这样的:

“ intent:// productlist /#Intent; scheme = westwing; package = de.westwing.android; end”