问题描述
Google Chrome不会在Deep Link上启动我的应用程序,但是,如果我从Firefox运行该应用程序,则会启动该应用程序.我以"onkat://"为例,因为我只是想首先启动该应用程序.
Google Chrome wouldn't launch my app on Deep Link, however, the app gets launched if I run it from Firefox. I use "onkat://" just as an example as I just want to get the app launched first.
以下是我的AndroidManifest.xml中的代码
Following is the code in my 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>
有什么想法吗?如果Google Chrome浏览器在Intent过滤器中还有其他要求?或解决方法.我在多种设备上进行了测试,但Chrome浏览器除外,其他浏览器可以在我只输入"onkat://"时运行我的应用程序
Any ideas? If Google Chrome requires anything more in the Intent-filter? or a work-around. I tested on multiple devices, except Chrome the other browsers run my app when I simply enter "onkat://"
观察:我认为Google Chrome通常不能与Deep Link一起使用.即使Facebook深层链接也无法在其上运行,而在其他浏览器(fb://)上也可以运行.另外,谷歌浏览器深度链接不适用于iOS
Observation: I think Google Chrome doesn't work with Deep Link in general. Even Facebook deep link doesn't work on it, while it works on other browsers (fb://). Also, google chrome Deep Link doesn't work for iOS
推荐答案
Chrome更改了它处理从Chrome浏览器应用启动的意图的方式.
Chrome has changed how it handles intents launched from the Chrome browser app.
<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
The answer can be found here: https://developer.chrome.com/multidevice/android/intents
这篇关于Google Chrome无法在Android的Deep Link上打开应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!