From 4b91194c687a462b89945243a5f9775a031bd2d5 Mon Sep 17 00:00:00 2001 From: rob-gioia-branch Date: Fri, 4 Oct 2024 16:42:21 -0400 Subject: [PATCH] Native Android integration validator code is called, but the 3rd test results in an error causing a crash Native Android integration validator code is called, but the 3rd test results in an error causing a crash --- .../src/main/java/io/branch/rnbranch/RNBranchModule.java | 7 +++++++ branchreactnativetestbed/components/BranchWrapper.ts | 2 +- src/index.js | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/io/branch/rnbranch/RNBranchModule.java b/android/src/main/java/io/branch/rnbranch/RNBranchModule.java index e3bb4c8ad..1b414af75 100644 --- a/android/src/main/java/io/branch/rnbranch/RNBranchModule.java +++ b/android/src/main/java/io/branch/rnbranch/RNBranchModule.java @@ -24,6 +24,7 @@ import io.branch.referral.Branch.BranchLinkCreateListener; import io.branch.referral.BuildConfig; import io.branch.referral.QRCode.BranchQRCode; +import io.branch.referral.validators.IntegrationValidator; import io.branch.referral.util.*; import io.branch.referral.Branch; import io.branch.indexing.*; @@ -1251,4 +1252,10 @@ public void setDMAParamsForEEA(boolean eeaRegion, boolean adPersonalizationConse Branch branch = Branch.getInstance(); branch.setDMAParamsForEEA(eeaRegion, adPersonalizationConsent, adUserDataUsageConsent); } + + @ReactMethod + public void validateSDKIntegration() { + Log.d(REACT_CLASS,"Integration Validator Code Called"); + IntegrationValidator.validate(mActivity); + } } diff --git a/branchreactnativetestbed/components/BranchWrapper.ts b/branchreactnativetestbed/components/BranchWrapper.ts index 5da9a13e7..c965f4fa8 100644 --- a/branchreactnativetestbed/components/BranchWrapper.ts +++ b/branchreactnativetestbed/components/BranchWrapper.ts @@ -187,7 +187,7 @@ export default class BranchWrapper { }; validateSDKIntegration = async () => { - IntegrationValidator.validate(); + branch.validateSDKIntegration(); }; viewFirstReferringParams = async () => { diff --git a/src/index.js b/src/index.js index 02d789eb6..ae5adca38 100644 --- a/src/index.js +++ b/src/index.js @@ -138,7 +138,9 @@ class Branch { ); }; - validateSDKIntegration = () => {}; + validateSDKIntegration = () => { + RNBranch.validateSDKIntegration(); + }; /*** PreInstall Parameters ***/ setPreInstallCampaign = (campaign) =>