Reputation: 3626
Samsung Galaxy S6, Android Marshmallow 6.0. Developing with Unity.
Deep links https:// do not work, but intent:// do work in:
Both https:// and intent:// do work in:
Is there something about Samsung custom apps?
assetlinks.json
[{
"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>
😕 P.S. I have googled and found a lot of SO posts, but none of them I found actually helpful.
Upvotes: 6
Views: 6731
Reputation: 1054
The "https://" deep links you refer to are using Android's App Links mechanism for opening apps (check this link for a good overview: https://blog.branch.io/technical-guide-to-deep-linking-android-app-links/).
The "intent://" deep links are using Chrome Intents (check: https://blog.branch.io/technical-guide-to-deep-linking-on-android-chrome-intents/).
The Samsung apps you mention simply don't support App Links - support is spotty for App Links generally. The safest path is to support both URI Scheme linking/Chrome intents and App Links, as you will find different apps that support one but not the other - and vice-versa.
Upvotes: 7
Reputation: 9117
You can try this multiple config.. hope its work
<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>
Upvotes: 1