Skip to content

Commit 7f58ba0

Browse files
committed
feat: update webbridge plugin for Meta install referrer
1 parent ff06d7a commit 7f58ba0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Adjust/sdk-plugin-webbridge/src/main/assets/adjust_config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function AdjustConfig(appToken, environment, legacy) {
5656
this.playStoreKidsAppEnabled = null;
5757
this.coppaCompliantEnabled = null;
5858
this.finalAttributionEnabled = null;
59+
this.fbAppId = null;
5960
}
6061

6162
AdjustConfig.EnvironmentSandbox = 'sandbox';
@@ -264,3 +265,7 @@ AdjustConfig.prototype.setCoppaCompliantEnabled = function(isEnabled) {
264265
AdjustConfig.prototype.setFinalAttributionEnabled = function(isEnabled) {
265266
this.finalAttributionEnabled = isEnabled;
266267
};
268+
269+
AdjustConfig.prototype.setFbAppId = function(fbAppId) {
270+
this.fbAppId = fbAppId;
271+
};

Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeInstance.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public void onCreate(String adjustConfigString) {
175175
Object playStoreKidsAppEnabledField = jsonAdjustConfig.get("playStoreKidsAppEnabled");
176176
Object coppaCompliantEnabledField = jsonAdjustConfig.get("coppaCompliantEnabled");
177177
Object finalAttributionEnabledField = jsonAdjustConfig.get("finalAttributionEnabled");
178+
Object fbAppIdField = jsonAdjustConfig.get("fbAppId");
178179

179180
String appToken = AdjustBridgeUtil.fieldToString(appTokenField);
180181
String environment = AdjustBridgeUtil.fieldToString(environmentField);
@@ -408,6 +409,12 @@ public boolean launchReceivedDeeplink(Uri deeplink) {
408409
adjustConfig.setFinalAttributionEnabled(finalAttributionEnabled);
409410
}
410411

412+
// FB App ID
413+
String fbAppId = AdjustBridgeUtil.fieldToString(fbAppIdField);
414+
if (fbAppId != null) {
415+
adjustConfig.setFbAppId(fbAppId);
416+
}
417+
411418
// Manually call onResume() because web view initialisation will happen a bit delayed.
412419
// With this delay, it will miss lifecycle callback onResume() initial firing.
413420
Adjust.onCreate(adjustConfig);

0 commit comments

Comments
 (0)