筛选项

Android 测试

启用 Logging

Branch.enableLogging()
Branch.enableLogging();

使用 Test Key

  • 使用 Branch test key 而非 live key
  • 将 test key 添加到 AndroidManifest.xml, as described here.
  • 然后,要使用您的 test key,请在加载 Branch 之前添加以下内容(即,在调用 Branch.getAutoInstance()). Note that if you do not have an Application class and are using BranchApp this method will not work but you can still use the test key by setting testMode=true in the manifest.
Branch.enableTestMode()
  • 在发布到生产环境之前将其删除

测试您的 Branch 集成

通过调用。。。来测试您的 Branch 集成 IntegrationValidator.validate in your MainActivity's onStart(). Check your ADB Logcat to make sure all the SDK Integration tests pass. Make sure to comment out or remove IntegrationValidator.validate in your production build.

IntegrationValidator.validate(this)
IntegrationValidator.validate(MainActivity.this);

Sample Applications

模拟 Install

要确保正确设置 SDK,您不再需要通过 SDK 本身模拟 install。您可以改为通过完成以下步骤来进行端到端功能测试:

应用索引验证器

使用我们的验证器来确定您的应用和网站是否已针对应用索引正确配置。

App Indexing 验证器工具

集成状态工具

显示 Branch 集成状态。为了获得最佳体验,我们建议您完成列出的所有步骤。如果特定平台与您无关,请跳过该部分。

集成状态工具