Skip to content

Commit d89d4ef

Browse files
committed
feat: add support for store type in webbridge
1 parent 2872fc2 commit d89d4ef

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function AdjustConfig(appToken, environment, legacy) {
5252
this.shouldReadDeviceIdsOnce = null;
5353
this.eventDeduplicationIdsMaxSize = null;
5454
this.isFirstSessionDelayEnabled = null;
55+
this.storeInfoType = null;
56+
this.storeInfoAppId = null;
5557
}
5658

5759
AdjustConfig.EnvironmentSandbox = 'sandbox';
@@ -243,3 +245,8 @@ AdjustConfig.prototype.setEventDeduplicationIdsMaxSize = function(eventDeduplica
243245
AdjustConfig.prototype.enableFirstSessionDelay = function() {
244246
this.isFirstSessionDelayEnabled = true;
245247
};
248+
249+
AdjustConfig.prototype.setStoreInfo = function(storeInfoType, storeInfoAppId) {
250+
this.storeInfoType = storeInfoType;
251+
this.storeInfoAppId = storeInfoAppId;
252+
};

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.adjust.sdk.AdjustFactory;
1616
import com.adjust.sdk.AdjustSessionFailure;
1717
import com.adjust.sdk.AdjustSessionSuccess;
18+
import com.adjust.sdk.AdjustStoreInfo;
1819
import com.adjust.sdk.AdjustThirdPartySharing;
1920
import com.adjust.sdk.LogLevel;
2021
import com.adjust.sdk.OnAdidReadListener;
@@ -143,6 +144,8 @@ public void initSdk(String adjustConfigString) {
143144
Object shouldReadDeviceIdsOnceField = jsonAdjustConfig.get("shouldReadDeviceIdsOnce");
144145
Object eventDeduplicationIdsMaxSizeField = jsonAdjustConfig.get("eventDeduplicationIdsMaxSize");
145146
Object isFirstSessionDelayEnabledField = jsonAdjustConfig.get("isFirstSessionDelayEnabled");
147+
Object storeInfoTypeField = jsonAdjustConfig.get("storeInfoType");
148+
Object storeInfoAppIdField = jsonAdjustConfig.get("storeInfoAppId");
146149

147150
String appToken = AdjustBridgeUtil.fieldToString(appTokenField);
148151
String environment = AdjustBridgeUtil.fieldToString(environmentField);
@@ -376,6 +379,14 @@ public boolean launchReceivedDeeplink(Uri deeplink) {
376379
}
377380
}
378381

382+
// store info
383+
String storeInfoType = AdjustBridgeUtil.fieldToString(storeInfoTypeField);
384+
String storeInfoAppId = AdjustBridgeUtil.fieldToString(storeInfoAppIdField);
385+
if (storeInfoType != null || storeInfoAppId != null) {
386+
AdjustStoreInfo adjustStoreInfo = new AdjustStoreInfo(storeInfoType, storeInfoAppId);
387+
adjustConfig.setAdjustStoreInfo(adjustStoreInfo);
388+
}
389+
379390
Adjust.initSdk(adjustConfig);
380391

381392
isInitialized = true;

0 commit comments

Comments
 (0)