Conversation
Contributor
muzahidul-opti
left a comment
There was a problem hiding this comment.
Changes look good to me. I really like OptimizelyUserContextAndroid subclassing. It simplifies the async approach.
I made a couple of questions for clarifications.
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/cmab/DefaultCmabClient.kt
Show resolved
Hide resolved
5e0be9d to
b85e1a6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Outdated
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
raju-opti
approved these changes
Dec 12, 2025
shared/src/main/java/com/optimizely/ab/android/shared/Client.java
Outdated
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java
Show resolved
Hide resolved
android-sdk/src/main/java/com/optimizely/ab/android/sdk/cmab/DefaultCmabClient.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces significant enhancements to the Android SDK, primarily by adding support for a new Contextual Multi-Armed Bandit (CMAB) service and improving user context handling for decision APIs. The main changes include the introduction of the
OptimizelyUserContextAndroidclass for better synchronous and asynchronous decision support, integration of CMAB service components into the SDK, and updates to the builder and manager classes to support these new features.User Context and Decision API Improvements:
OptimizelyUserContextAndroidclass, extendingOptimizelyUserContextto provide both synchronous and asynchronous decision APIs, ensuring backward compatibility and improved usability for Android clients. (android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyUserContextAndroid.java)OptimizelyClientclass to returnOptimizelyUserContextAndroidinstances from allcreateUserContextmethods, with improved null checks and logging for invalid parameters. (android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyClient.java)CMAB Service Integration:
OptimizelyManager, including new fields, constructor parameters, and wiring through the builder pattern. This enables configuration and use of the CMAB service within the SDK. (android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java) [1] [2] [3] [4] [5] [6]android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java) [1] [2]New CMAB Client Implementation:
CMABClientclass, which handles HTTP requests to the CMAB prediction endpoint, including request/response handling, error management, and exponential backoff for retries. (android-sdk/src/main/java/com/optimizely/ab/android/sdk/cmab/CMABClient.kt)Other Minor Changes:
DefaultPersistenceDelegate(appears unused and may be cleanup in a later revision). (android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java)These changes collectively enhance the SDK's flexibility and robustness, especially around user context management and support for advanced decisioning features like CMAB."
Test plan
Issues