gpt4 book ai didi

android - android 中的 Branch.io 深层链接无论如何都会打开 Play 商店

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:26:03 25 4
gpt4 key购买 nike

无论如何,当我点击使用 branch.io 创建的链接时,用户会被带到 Google Play :-((

这是 list 中的相关 Activity :

<activity
android:name=".activities.DetailActivity"
android:configChanges="keyboard|screenSize|orientation"
android:screenOrientation="portrait">
<intent-filter>
<data
android:host="open"
android:scheme="foo" />
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>

这是 branch.io 仪表板:

enter image description here

最佳答案

来自Deferred Deep Linking SDK for Android README :

Chrome seems to take me to Google Play all the time. Why?

Chrome is very picky about opening up the app directly. Chrome utilizes the intent system to try to open up the app, and fails back to the Play Store far too easily. Here are 3 things to verify:

  1. Make sure the package name for the test build matches the package registered in the Branch settings and matches the package in Google play.

  2. Make sure the URI scheme of the test build matches the Branch settings.

  3. Verify that you've added the proper host 'open' in the Manifest - see here

我看到你用这个 app作为例子。请检查您的应用程序的包名称是否为 com.foo.inappbilling,否则 Branch.io 链接将不会打开您的应用程序并且将始终打开 Google Play 商店.

我能够重现您的问题,并通过设置正确的包名称解决了问题。如果您使用 Gradle,您可以直接从 app/build.gradle 执行此操作:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.foo.inappbilling"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
...

关于android - android 中的 Branch.io 深层链接无论如何都会打开 Play 商店,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32900954/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com