2017-01-30 5 views
2

Samsung Galaxy S6、Android Marshmallow 6.0 Unityを使って開発する。サムスンネイティブアプリのディープリンクは動作しません

サムスンのアプリ

ディープリンクます。https://をしない仕事、しかし意図:

  • インターネットアプリ
  • メモアプリ://はで作業を行います

Googleのアプリを

両方ます。https://意図:

  • Google Chromeのアプリ
  • Gmailアプリ

は何かがあります://はで作業を行いますサムスンのカスタムアプリについて

コード

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.私はグーグルで見つけた多くのの記事のうち、私は実際に役立つと思ったのどれも見つかりませんでした。

+0

このライブラリを使用することをお勧めします。[Deeplink Dispatch](https://github.com/airbnb/DeepLinkDispatch).. – ZeroOne

+0

ありがとうございます。しかし、最初は本当になぜそれが実際に起こるのか理解したいと思います。 – igorpavlov

答えて

3

その作業を願って、この複数の設定を試すことができます(良いため、このリンクをチェックし、あなたが参照ディープリンクは、アプリケーションを開くためのAndroidのAppリンク・メカニズムを使用しています概要:https://blog.branch.io/technical-guide-to-deep-linking-android-app-links/)。

「インテント://」ディープリンクはChromeインテント(チェック:https://blog.branch.io/technical-guide-to-deep-linking-on-android-chrome-intents/)を使用しています。

あなたが言及したサムスンのアプリケーションは、単にアプリケーションリンクをサポートしていません - 一般的に、アプリケーションリンクのサポートはあまりありません。一番安全な方法は、URIスキームのリンク/ ChromeのインテントとApp Linksの両方をサポートすることです。

+0

最後に。ありがとうございました。 – igorpavlov

0

あなたは..「https://で」

<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> 
+0

ありがとう、私はそれを試してみましょう。この設定がうまくいくと思われる理由を説明してください。サムスンはちょうどこれを好きではありません:アンドロイド:host = "v.xxx.com"何らかの理由で? – igorpavlov

+0

これは動作しません。 – igorpavlov

関連する問題