Android 深度链接在三星原生应用程序中不起作用
三星Galaxy S6,安卓棉花糖6.0。团结发展 三星的应用程序 深度链接https://do不是工作,而是意图://do工作:Android 深度链接在三星原生应用程序中不起作用,android,android-intent,deep-linking,galaxy,Android,Android Intent,Deep Linking,Galaxy,三星Galaxy S6,安卓棉花糖6.0。团结发展 三星的应用程序 深度链接https://do不是工作,而是意图://do工作: 互联网应用 备忘录应用程序 谷歌的应用程序 https://和intent://都在以下位置工作: 谷歌浏览器应用程序 Gmail应用程序 三星的定制应用程序有什么特点吗 代码 assetlinks.json [{ "relation": ["delegate_permission/common.handle_all_urls"], "target"
- 互联网应用
- 备忘录应用程序
- 谷歌浏览器应用程序
- Gmail应用程序
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.xxx.app",
"sha256_cert_fingerprints":
["4E:CC:14:62:B3:1D:13..."]
}
}]
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- REPLACE com.companyname.projectname to your app bundle ID-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xxx.app" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="1" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
<activity android:name="causallink.assets.DeepLinkBridge" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
<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="https" android:host="v.xxx.com" />
</intent-filter>
</activity>
</application>
</manifest>
您可以尝试此多重配置。。希望它能起作用
<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="v.xxx.com"
android:pathPrefix="/yourpath"
android:scheme="http" />
<data
android:host="www.v.xxx.com"
android:pathPrefix="/yourpath"
android:scheme="https" />
<data
android:host="*.v.xxx.com"
android:scheme=""
android:path="/yourpath/" />
<data
android:path=""
android:pathPrefix="/*"
android:pathPattern="\?"
android:pathPattern="put your regex" />
</intent-filter>
您所指的“https://”深度链接正在使用Android的应用程序链接机制来打开应用程序(查看此链接以获得良好的概述:)
“intent://”深度链接正在使用Chrome intent(检查:)
你提到的三星应用程序根本不支持应用程序链接——通常对应用程序链接的支持参差不齐。最安全的路径是支持URI方案链接/ Chrome意图和应用程序链接,因为你会发现不同的应用程序支持一个而不是另一个,反之亦然。谢谢你的链接。然而,一开始我真的很想理解它为什么会发生。@igorpavlov你知道为什么会发生这种事情吗?谢谢,我来试试。你能解释一下为什么你认为这个配置会起作用吗?三星不是出于某种原因喜欢这个:android:host=“v.xxx.com”吗?