Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deep links do not work in Samsung native apps

Samsung Galaxy S6, Android Marshmallow 6.0. Developing with Unity.

Samsung's apps

Deep links https:// do not work, but intent:// do work in:

  • Internet app
  • Memo app

Google's apps

Both https:// and intent:// do work in:

  • Google Chrome app
  • Gmail app

Is there something about Samsung custom apps?

Code

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.

like image 383
igorpavlov Avatar asked Jan 30 '17 00:01

igorpavlov


People also ask

Do all apps have deep links?

Unlike internet URLs and web addresses that are standardized across devices and platforms, deep links aren't universal. To launch your Android app, you'll need a different deep link from one needed to launch your iOS app.

Why is my Samsung not opening links?

Why can't I open links on Android? If you can't open links on Android apps, make sure to check in-app settings, reinstall the app, or inspect in-app permissions. If that doesn't help, clearing cache and data from essential Google Services or reinstalling WebView should resolve the issue.

Can you deep link into an app?

Android support on the Google Play store: Google gives app developers the option of passing the original deep link through the Google Play App Store using the Intent: "The deep link should take users directly to the content, without any prompts, interstitial pages, or logins.

Does Android support universal links?

Android App Links are Google's response to Apple's introduction of Universal Links. They are only available on Android Marshmallow (6.0) and upwards. They are HTTP URLs that can be used to link to content inside a native app if it is installed on the device.


1 Answers

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.

like image 76
dwestgate Avatar answered Sep 30 '22 15:09

dwestgate