Android 版本记录


(March 10, 2023)

Added support for Snap partner parameters with addSnapPartnerParameter
For more info see: https://help.branch.io/using-branch/docs/snap-advanced-conversions#enabling-snap-advanced-conversions


(March 3, 2023)

New feature for plugin SDK developers to defer native Branch Android SDK until plugin notifies when ready
To enable, enter this key value pair in your branch.json file inside of your /src/main/assets/
"deferInitForPluginRuntime": true
This feature is opt in only for now. Requires plugin SDK to implement notification to native modules.

Fixes enableLogging feature if set in branch.json
"enableLogging": true


(Dec 7, 2022)

  • Fixes a bug with setIdentity not consistently calling v1/profile
  • Adds switch to prioritize referrer links for attribution over preinstall metadata
    • To enable, call setReferringLinkAttributionForPreinstalledAppsEnabled before Branch.getAutoInstance(this)


(Oct 25, 2022)

  • debug field is now included in all events, previously only on init requests
  • source field moved from data block to top level in v1 url requests


(Oct 3, 2022)

  • For user agent string, move webview instance to ui thread on init
    • To use this method to obtain the user agent string, set Branch.setIsUserAgentSync(true)
    • Static WebSettings is the default


(Sep 30, 2022)

  • Using alternative method to obtain user agent through WebView instance with static as fallback


(Aug 29, 2022)

  • Updated compile and target API to 32, updated build tools
  • Changed POM scope for firebase-appindexing from "runtime" to "compile"


(Aug 15, 2022)

  • Sending app_store install source on requests
  • Added default retry cap for no-internet request queues


(Aug 8, 2022 )

  • Removed unused IMEI strings and references in the Java
  • Change setIdentity call to immediately save provided identity string instead of waiting for network call. Additionally it is sent as part of v1 open and install requests.


( Jun 15, 2022 )

  • Added methods to generate Branch QR codes
    • getQRCodeAsData
    • getQRCodeAsImage
  • Added support for additional store referrer APIs. No code needed other than to import the store's referrer API artifact into your app
    • Huawei App Gallery
    • Samsung Galaxy Store**
    • Xiaomi GetApps**
    • ** Contact your Samsung or Xiaomi representative for assistance with obtaining their store referrer API artifact.
  • Upgraded Google Install Referrer API
  • Updated Android minimum SDK to 21
  • Replaced JCenter with mavenCentral in allprojects.repositories


( Jun 1, 2022 )

  • Fixes an issue with previously set randomly generated configuration values being skipped over.

:警告: v5.1.4

( Apr 29, 2022 )
Warning: This release has a configuration issue that incorrectly marks opens as reinstalls. Please use 5.1.5

  • Fix retry logic for network requests when there is no internet availability.
  • Replace "identity_id" with "randomized_bundle_token" and "device_fingerprint_id" with "randomized_device_token"


( Mar 25, 2022 )

  • Collect and persist GCLID
    • A custom expiration window for the GCLID can be set by public void setReferrerGclidValidForWindow(long window)
  • Credits related methods and fields marked as deprecated
  • Fixed IllegalAccessException on API 31, using DisplayManager instead of WindowManager


( Mar 10, 2022 )

  • Update payloads to include generated UUID when valid GAID is retrieved, replacing hardware ID. UUID is persisted locally.
  • Fix bug which spammed the log for no-op event retry attempts when tracking is disabled.


( Feb 18, 2022 )

  • Fix NPE if intent is null while getting referrer


( Feb 9, 2022 )

  • Added BranchPluginSupport class with deviceDescription() method. Will be used by the AdobeBranchExtension to pass device data.
  • Resolves timeout and non-initialization issues introducing a connect timeout, and retrying init requests.
    • Possible behavior change is with the increased timeout, any operations awaiting these requests may see longer timeouts.
    • To set the timeouts:
      • public void setConnectTimeout(int connectTimeout)
      • public void setTimeout(int timeout) (Time is in milliseconds)


( Nov 10, 2021 )

  • Bug fixes: IntegrationValidator (ConcurrentModificationException, Decoding Resource Strings)


( Oct 15, 2021 )

  • Bug fixes: improper shutdown of resource, multiline server responses
  • Fix crash when using Branch JSON config


( Oct 1, 2021 )

  • Always include Google Play Store referrer in install
  • IntegrationValidator now recognizes String resources
  • Fix edge case that could cause a stack overflow


( Sep 21, 2021 )

  • Avoid NPE when Branch reference in BranchPostTask is garbage collected


( Aug 23, 2021 )

  • Avoid NPE when Activity reference is null


( Aug 4, 2021 )

  • Collect initial_referrer


( May 20, 2021 )

  • Avoid potential NPE
  • When reinitializing session without an expected intent flag, invoke callback with error rather than ignoring it.


( April 29, 2021 )

  • Fix bug that can block UI thread
  • Fix race condition between session initialization requests invoked by client and SDK
  • Fix network request timeout control


( March 1, 2021 )

  • Patch: fix getSdkVersionNumber() API in v2 events


( February 26, 2020 )

  • Add INITIATE_STREAM and COMPLETE_STREAM standard events
  • Fix getSdkVersionNumber() API


( February 17, 2021 )

  • Add API to pass hashed partner parameters (Facebook integration)
  • Fix bugs in the networking pipeline of CPID and LATD requests
  • Fix bug preventing callback invocation when url creation request times out
  • Add support for static SKD configuration via branch.json file
  • Deprecate SDK initializers with isReferrable flag


( Dec 9, 2020 )

  • Reduce calls to v1/close
  • Fix validator errors
  • Fix setNetworkTimeout(...) API



  • 升级 Play Referrer library



  • 删除 content discovery



  • 重构/弃用测试和调试模式
  • 在测试模式下报告 Google 广告 ID
  • 通过安装引荐(install referrer)来源库设置预安装数据



  • 添加了使用一对一会话构建器替换过时的 initSession 方法的文档
  • 添加了 disableAdNetworkCallouts(boolean) API



  • 阻止自我初始化。
  • 延迟初始化并阻止自我初始化,直到用户删除延迟任务或超时传递为止。
  • 从不再支持 Google 移动服务的华为新设备中收集 OAID
    介绍 sessionBuilder。
  • 当 intent 包含额外的 "branch" 而不包含 "branch_force_new_session" 时,修复 reInitSession。
  • 更换 initSessionForced with Branch.bypassWaitingForIntent(true)
  • 删除 CPID API 中潜在的 NPE。



  • Accommodate single activity architecture/navigation component (reintroduced "SDK already initialized" error and ensured reInitSession() only fires when intent contains branch data).
  • 如果 SDK 与插件捆绑在一起,请勿自行初始化。



  • Hotfix 将 CPID 和 LATD 侦听器路径还原到较新的版本。
  • 用日志替换 “SDK 已初始化”错误,并返回最新的引用参数。



  • 删除 install referrer broadcast receiver,并捆绑 SDK 中的 Play Install Referrer Library。
  • 确保在 Kotlin 中调用了回调(传递了非 null 侦听器)。



  • 将归因窗口设为 LATD 请求的可选窗口。



  • 删除初始化竞争条件。
  • Do not auto-initialize sessions, make calling initSession a mandatory step required of Branch SDK users (officially this was already implied).
  • Overload reInitSession with different callbacks and start advertising it to users as the official way to handle session reinitialization in cases where activity is in foreground and is being reopened.
  • 确保运营商字段不包含空 string,并省略该字段。



  • 去除 fabric 构建。
  • TUNE SDK 缩小了字段差距。
  • 修复了无触屏设备上的分享链接。
  • 可配置的 CDN endpoint。
  • 重构代码库以遵循 Android Studio 项目结构。
  • 将 LifecycleObserver 与 Branch.java 主类分离。



  • 支持 Fire OS。
  • 启用 limit ad tracking (限制广告追踪)后,请勿收集广告 ID。
  • 每当应用可见时,重置广告 ID 和 limit ad tracking (限制广告追踪)值。



  • 新增了对跨平台 ID(Cross-Platform ID,即 CPID)和最后归因触点数据(Last attributed touch data,即 LATD)的支持。



  • Added new customer_event_alias setter method; removed standard event type: customer_event_alias
  • 添加了 IMEI 收集代码选项



  • 从使用 Android Support Library 切换为使用 Android X
  • 添加了新的标准事件类型:customer_event_alias
  • 实现对 pre-install 分析的支持
  • 添加了设置自定义基本 URL 的选项



  • 启用 privacy 时允许创建短链接



  • 现在,每个请求中都包含硬件 ID
  • 清理了编译器警告,并将工具更新为最新版本



  • 在应用处于前台时添加了对推送通知的支持



  • 确保所有请求中都包含 Google Aid
  • 重构了调试的工作方式,包括确保不在调试模式下可以关闭所有调试消息。
  • 添加了新的标准事件以与 Tune 保持相等
  • 修复了在同步块中围绕事件队列保存首选项的同步问题。



  • 修复了 API 级别16〜19设备上 HttpsURLConnection 的 TLS1.2问题
  • 在 Android SDK 中添加了 SDK 版本标签,以帮助 Google 扫描 API
  • 对于选择在 onStart()方法中完成启动器 Activity 的应用,SDK 现在支持与 enableForcedSession()进行深度链接