Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2025-02-07 Version 6.5.0
- Update iOS SDK to 3.9.0
- Update Android SDK to 5.15.1
- Exposed new method `setConsumerProtectionAttributionLevel` to set CPP level

2024-10-29 Version 6.4.0
- Update iOS SDK to 3.6.5
- Update Android SDK to 5.13.0
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ def safeExtGet(prop, fallback) {
dependencies {
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'com.facebook.react:react-native:+' // From node_modules
api 'io.branch.sdk.android:library:5.12.4'
api 'io.branch.sdk.android:library:5.15.1'
}
26 changes: 26 additions & 0 deletions android/src/main/java/io/branch/rnbranch/RNBranchModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,32 @@ public void setDMAParamsForEEA(boolean eeaRegion, boolean adPersonalizationConse
branch.setDMAParamsForEEA(eeaRegion, adPersonalizationConsent, adUserDataUsageConsent);
}

@ReactMethod
public void setConsumerProtectionAttributionLevel(String level) {
Branch branch = Branch.getInstance();
Defines.BranchAttributionLevel attributionLevel;

switch (level) {
case "FULL":
attributionLevel = Defines.BranchAttributionLevel.FULL;
break;
case "REDUCED":
attributionLevel = Defines.BranchAttributionLevel.REDUCED;
break;
case "MINIMAL":
attributionLevel = Defines.BranchAttributionLevel.MINIMAL;
break;
case "NONE":
attributionLevel = Defines.BranchAttributionLevel.NONE;
break;
default:
Log.w(REACT_CLASS, "Invalid attribution level: " + level);
return;
}

branch.setConsumerProtectionAttributionLevel(attributionLevel);
}

@ReactMethod
public void validateSDKIntegration() {
IntegrationValidator.validate(mActivity);
Expand Down
5 changes: 5 additions & 0 deletions branchreactnativetestbed/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ class App extends React.Component<any, MyState> {
onPress: this.branchWrapper.viewLatestReferringParams.bind(this),
image: require('./images/bolt_FILL0_wght400_GRAD0_opsz48.png'),
},
{
text: 'Set Attribution Level',
onPress: () => this.branchWrapper.setConsumerProtectionAttributionLevel('REDUCED'),
image: require('./images/person_FILL1_wght400_GRAD0_opsz48.png'),
},
{
text: 'Set User ID',
onPress: () => this.branchWrapper.setUserIdAsync('rntest'),
Expand Down
6 changes: 6 additions & 0 deletions branchreactnativetestbed/components/BranchWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ export default class BranchWrapper {
});
};

setConsumerProtectionAttributionLevel = (level: 'FULL' | 'REDUCED' | 'MINIMAL' | 'NONE') => {
console.log('BranchWrapper setConsumerProtectionAttributionLevel ' + level);
branch.setConsumerProtectionAttributionLevel(level);
this.createAlert('Attribution Level Set', `Level set to: ${level}`);
};

toggleTracking = async () => {
let trackingDisabled = await branch.isTrackingDisabled();

Expand Down
Loading
Loading