-
Couldn't load subscription status.
- Fork 39
[MOB-12263] android-add-ability-to-get placements #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: loren/embedded/MOB-12261-add-embedded-manager-class
Are you sure you want to change the base?
Changes from 6 commits
12ee8fd
93402fd
b916fb3
3f5fa41
b0e17f9
d42dd73
67278b7
06a94fc
80ec4fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||||||
| import com.facebook.react.bridge.ReadableArray; | ||||||||||
| import com.facebook.react.bridge.ReadableMap; | ||||||||||
| import com.facebook.react.bridge.UiThreadUtil; | ||||||||||
| import com.facebook.react.bridge.WritableArray; | ||||||||||
| import com.facebook.react.bridge.WritableMap; | ||||||||||
| import com.facebook.react.modules.core.DeviceEventManagerModule; | ||||||||||
|
|
||||||||||
|
|
@@ -23,10 +24,14 @@ | |||||||||
| import com.iterable.iterableapi.IterableAction; | ||||||||||
| import com.iterable.iterableapi.IterableActionContext; | ||||||||||
| import com.iterable.iterableapi.IterableApi; | ||||||||||
| import com.iterable.iterableapi.IterableAttributionInfo; | ||||||||||
| import com.iterable.iterableapi.IterableAuthHandler; | ||||||||||
| import com.iterable.iterableapi.IterableConfig; | ||||||||||
| import com.iterable.iterableapi.IterableCustomActionHandler; | ||||||||||
| import com.iterable.iterableapi.IterableAttributionInfo; | ||||||||||
| // import com.iterable.iterableapi.IterableEmbeddedManager; | ||||||||||
| import com.iterable.iterableapi.IterableEmbeddedMessage; | ||||||||||
| // import com.iterable.iterableapi.IterableEmbeddedSession; | ||||||||||
| // import com.iterable.iterableapi.IterableEmbeddedUpdateHandler; | ||||||||||
| import com.iterable.iterableapi.IterableHelper; | ||||||||||
| import com.iterable.iterableapi.IterableInAppCloseAction; | ||||||||||
| import com.iterable.iterableapi.IterableInAppHandler; | ||||||||||
|
|
@@ -45,6 +50,7 @@ | |||||||||
| import java.util.Map; | ||||||||||
| import java.util.HashMap; | ||||||||||
| import java.util.List; | ||||||||||
| import java.util.ArrayList; | ||||||||||
| import java.util.concurrent.CountDownLatch; | ||||||||||
| import java.util.concurrent.TimeUnit; | ||||||||||
|
|
||||||||||
|
|
@@ -88,10 +94,15 @@ public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, S | |||||||||
| configBuilder.setAuthHandler(this); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (configReadableMap.hasKey("enableEmbeddedMessaging")) { | ||||||||||
| configBuilder.setEnableEmbeddedMessaging(configReadableMap.getBoolean("enableEmbeddedMessaging")); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| IterableApi.initialize(reactContext, apiKey, configBuilder.build()); | ||||||||||
| IterableApi.getInstance().setDeviceAttribute("reactNativeSDKVersion", version); | ||||||||||
|
|
||||||||||
| IterableApi.getInstance().getInAppManager().addListener(this); | ||||||||||
| IterableApi.getInstance().getEmbeddedManager().syncMessages(); | ||||||||||
|
|
||||||||||
| // MOB-10421: Figure out what the error cases are and handle them appropriately | ||||||||||
| // This is just here to match the TS types and let the JS thread know when we are done initializing | ||||||||||
|
|
@@ -118,6 +129,10 @@ public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, | |||||||||
| configBuilder.setAuthHandler(this); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (configReadableMap.hasKey("enableEmbeddedMessaging")) { | ||||||||||
| configBuilder.setEnableEmbeddedMessaging(configReadableMap.getBoolean("enableEmbeddedMessaging")); | ||||||||||
| } | ||||||||||
|
Comment on lines
+133
to
+134
|
||||||||||
| configBuilder.setEnableEmbeddedMessaging(configReadableMap.getBoolean("enableEmbeddedMessaging")); | |
| } | |
| configBuilder.setEnableEmbeddedMessaging(configReadableMap.getBoolean("enableEmbeddedMessaging")); | |
| } |
qltysh[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting Long placement IDs to double may cause precision loss for large values. Consider using pushString() or ensure the native interface expects numbers instead of longs.
| writableArray.pushDouble(placementId.doubleValue()); | |
| writableArray.pushString(placementId.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out import statements. These unused imports add clutter and should be cleaned up.