2016-09-15 24 views
0

我是branch.io的新手,但它讓我發瘋。使用Branch.io鏈接未在Android中打開

我剛剛成立我在branch.io儀表板的鏈接是這樣的:

Android URI scheme: http://www.foo.com/bar:// 

而且也退回到Google Play商店。

As well as the default URL http://www.foo.com 

在我的Android清單我進入這個

<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_xxxxxxxxxxxxxxxxx" /> 

這下我的主要活動

<intent-filter> 
      <data android:scheme="http://www.foo.com/bar" 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> 

的聯繫仍然沒有在Android的打開,也沒有在谷歌播放。

奇怪的是,這個鏈接:https://foo.app.link/xxxxxx在Google Play中打開了正確的應用頁面,但與我的branch.io設置中的內容沒有任何共同之處。

困惑爲什麼URI模式背後有兩種不同的邏輯。 感謝您的幫助!

回答

0

亞歷克斯從分支在這裏:你太放在scheme領域:)。分支儀表板應該有一個類似於foo://的URI方案,Android清單應該有<data android:scheme="foo" android:host="open" />

+0

感謝Alex提供的建議。我將這個方案簡化爲兩端只有'foo',現在foo.app.link/xxxxxx可以工作。你能否指定爲什麼在應用程序中打開,但只是www.foo.com不?我可以使用foo.app.link/xxxxxx,但是/ xxxxxx部分是我不應該分享的一個祕密? – KasparTr

+0

我想你可能會混淆URI方案的定義。 「www.foo.com」的方案實際上是'http'或'https',並且因爲http鏈接非常常見而被忽略,所以這兩件事不能直接互換。 URL的'/ xxxxxx'部分根本不是祕密 - 你應該*與Branch分享這部分內容 –

相關問題