Skip to content

Conversation

@scotthowie-optimove
Copy link
Contributor

@scotthowie-optimove scotthowie-optimove commented Dec 9, 2025

User description

Description of Changes

For deferred deep linking on andoird we want to make use of the install referrer api from google to more reliably handle the deferred deep link. Currently we copy the deeplink to a clipboard and retrieve it again once the app has been downloaded and opened. This can be flaky at times.

https://developer.android.com/google/play/installreferrer/library#connecting

Install referrer helper added and used to get referrer url. If unavailable will fallback to using clipboard method

Breaking Changes

  • None

Release Checklist

Prepare:

  • Detail any breaking changes. Breaking changes require a new major version number, and a migration guide in wiki / README.md

Bump versions in:

  • CHANGELOG.md
  • gradle.properties
  • add links to newly created wiki pages to readme
  • Update major version numbers in wiki (basic integration + push guides)

Integration tests

T&T Only

  • Init SDK with only optimove credentials
  • Associate customer
  • Associate email
  • Track events

Mobile Only

  • Init SDK with all credentials
  • Track events
  • Associate customer (verify both backends)
  • Register for push
  • Opt-in for In-App
  • Send test push
  • Send test In-App
  • Receive / trigger deep link handler (In-App/Push)
  • Receive / trigger the content extension, render image and action buttons for push
  • Verify push opened handler

Deferred Deep Links

  • With app installed, trigger deep link handler
  • With app uninstalled, follow deep link, install test bundle, verify deep link read from Clipboard, trigger deep link handler
  • With app uninstalled, follow deep link, download app from play store, verify deep link NOT read from Clipboard, trigger deep link handler

Combined

  • Track event for T&T, verify push received
  • Trigger scheduled campaign, verify push received
  • Trigger scheduled campaign, verify In-App received

Release Procedure

  • Squash and merge dev to master
  • Delete branch once merged

Generated description

Below is a concise technical summary of the changes proposed in this PR:

graph LR
checkForNonContinuationLinkMatch_("checkForNonContinuationLinkMatch"):::modified
isInstallReferrerAvailable_("isInstallReferrerAvailable"):::added
checkInstallReferrer_("checkInstallReferrer"):::added
getInstallReferrer_("getInstallReferrer"):::added
maybeProcessUrl_("maybeProcessUrl"):::modified
checkForDeferredLinkOnClipboard_("checkForDeferredLinkOnClipboard"):::modified
InstallReferrerCallback_("InstallReferrerCallback"):::added
extractDeepLinkFromReferrer_("extractDeepLinkFromReferrer"):::added
checkForNonContinuationLinkMatch_ -- "Checks install referrer availability before deferred deep link processing" --> isInstallReferrerAvailable_
checkForNonContinuationLinkMatch_ -- "Adds install referrer check before clipboard fallback for links" --> checkInstallReferrer_
checkInstallReferrer_ -- "Retrieves install referrer string asynchronously for deferred deep linking" --> getInstallReferrer_
checkInstallReferrer_ -- "Processes extracted deep link URL from install referrer callback" --> maybeProcessUrl_
checkInstallReferrer_ -- "Falls back to clipboard if install referrer deep link absent" --> checkForDeferredLinkOnClipboard_
getInstallReferrer_ -- "Uses callback interface to notify install referrer retrieval result" --> InstallReferrerCallback_
extractDeepLinkFromReferrer_ -- "Extracts deep link URL from install referrer string for processing" --> checkInstallReferrer_
classDef added stroke:#15AA7A
classDef removed stroke:#CD5270
classDef modified stroke:#EDAC4C
linkStyle default stroke:#CBD5E1,font-size:13px
Loading

Integrate the Google Play Install Referrer API into the SDK to reliably handle deferred deep links, improving upon the existing clipboard-based method. Introduce InstallReferrerHelper to manage API interactions and update DeferredDeepLinkHelper to prioritize the new API before falling back to the clipboard.

Latest Contributors(2)
UserCommitDate
konstantin_a@optimove.comUpdated-version-to-7.9.0November 06, 2025
david_ho@optimove.comenabled-push-notificat...October 27, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@k-antipochkin
Copy link
Collaborator

Can we use reflection just to see if installReferrer is available and if it is, use the typed methods?

@kris-opti kris-opti marked this pull request as ready for review December 16, 2025 21:13
@scotthowie-optimove scotthowie-optimove self-assigned this Dec 17, 2025
@scotthowie-optimove scotthowie-optimove merged commit 57febac into master Dec 17, 2025
7 checks passed
@scotthowie-optimove scotthowie-optimove deleted the 267882-ddl-install-referrer branch December 17, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants