2016-11-14 65 views
0

工作,这是我在我的清单有:深层链接不会分公司

<activity 
    android:name=".activities.VidyoSampleActivity" 
    android:label="@string/app_name" 
android:configChanges="orientation|screenSize"> 
    <intent-filter> 
     <data android:scheme="facetalk" android:host="open"/> 
     <action android:name="android.intent.action.VIEW" /> 
     <category android:name="android.intent.category.DEFAULT" /> 
     <category android:name="android.intent.category.BROWSABLE" /> 
    </intent-filter> 
</activity> 
<receiver android:name="io.branch.referral.InstallListener" android:exported="true"> 
<intent-filter> 
    <action android:name="com.android.vending.INSTALL_REFERRER" /> 
</intent-filter> 
</receiver> 
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_hjyeOhAByhF1x452yXtuEjdpCzhMiEAB" /> 
<meta-data 
android:name="io.fabric.ApiKey" 
android:value="c13e89c059c32c08041932f2d48b4e5bf1054b4a" /> 

我使用这个版本:compile 'io.branch.sdk.android:library:2.+'

而且我在应用程序类做初始化。 这是URL方案我已在dashboard.branch.io设置:facetalk://

但当我尝试此链接:

facetalk://facetalk.vidyo-nl.com/mobile.html?key=saETMuvxjeW2akgzbyt46Xffio&guestname=Test123&secure=yes
它什么都不做。

这是为什么? 我甚至从Fabric AndroidStudio插件创建了分支的代码。它仍然不起作用。我究竟做错了什么? 让我知道,如果有更多的信息需要

PS:

android:host="open" 

它将工作:如果我从意图过滤该删除。但我不认为它通过这样的分支。导致它不输入:

Branch branch = Branch.getInstance(); 
    branch.initSession(new Branch.BranchReferralInitListener() { 
     @Override 
     public void onInitFinished(JSONObject referringParams, BranchError error) { 
      if (error == null) { 
       Log.i("BranchConfigTest", "deep link data: " + referringParams.toString()); 
      } 
     } 
    }, this.getIntent().getData(), this); 

添加一些日志后。我发现,这是越来越记录,当应用程序首次启动:

11-16 12:18:45.237: I/BranchConfigTest(25065): deep link data: {"+is_first_session":false,"+clicked_branch_link":true,"room":"DpoxihjuKKKE24FAP2ByTILdZsg","guestname":"John","secure":"true","$marketing_title":"Join Conference","$one_time_use":false,"~creation_source":1,"~feature":"marketing","~id":"325753563785928408","~marketing":true,"+click_timestamp":1479295095,"+match_guaranteed":true,"~referring_link":"https:\/\/facetalk.app.link\/join?room=DpoxihjuKKKE24FAP2ByTILdZsg&guestname=John&secure=true"} 

我不明白这是如何被显示?因为我刚启动应用程序,我没有按任何链接。 此外,当我按我创建了一个链接,这个不会被调用了

回答

0

的Branch.io集成显示我需要的意图添加为此:

<intent-filter> 
      <data android:scheme="facetalk" android:host="open"/> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <category android:name="android.intent.category.BROWSABLE" /> 
     </intent-filter> 

但是,这并没有为我工作的分支2.x的 这是我能够加入的意图的方式:

<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="facetalk.app.link" /> 
     </intent-filter> 
+0

这其实并不正确。你添加的是[App Links]的意图过滤器(https://dev.branch.io/getting-started/universal-app-links/guide/android/)。前者是标准的[URI方案选项](https://dev.branch.io/getting-started/sdk-integration-guide/guide/android/)。您需要*这两个*以用于Android上的全部工作分支实施 –

+0

第一个不能像那样工作。我修改它,拿出android:host =“open”,它的工作原理,但我不知道它是否工作原因正常的uri计划或通过分支工作? –

+0

这取决于...你是否打开了一个URI方案地址或一个生成的分支链接? –

1

亚历克斯从Branch.io这里:你需要create a Branch link和测试与URL。使用URI方案直接输入深层链接路径不是正确的实现,并且(如您所发现的)不起作用。

+0

我创建了一个分叉路段,从市场营销。但如果我尝试打开它,它会把我的Chrome浏览器而不是我的应用程序 –

+0

这就像它甚至不承认我已安装该应用程序。 –

+0

有几种原因可能会导致这种情况发生,并且如果没有更多细节,则很难进行调试。我建议向分支机构[集成团队]提交一张票(https://support.branch.io/support/tickets/new) –