Skip to content

Commit 929e676

Browse files
committed
cmab endpoint configurable
1 parent a8d1ffa commit 929e676

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

android-sdk/src/main/java/com/optimizely/ab/android/sdk/cmab/CmabClientHelperAndroid.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import com.optimizely.ab.cmab.client.CmabClientHelper
1818

1919
open class CmabClientHelperAndroid {
2020

21-
open val cmabPredictionEndpoint: String
22-
get() = CmabClientHelper.CMAB_PREDICTION_ENDPOINT
21+
open var cmabPredictionEndpoint: String = CmabClientHelper.CMAB_PREDICTION_ENDPOINT
2322

2423
open val cmabFetchFailed: String
2524
get() = CmabClientHelper.CMAB_FETCH_FAILED

android-sdk/src/main/java/com/optimizely/ab/android/sdk/cmab/DefaultCmabClient.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ open class DefaultCmabClient : CmabClient {
3737
this.cmabClientHelper = CmabClientHelperAndroid()
3838
}
3939

40+
constructor(context: Context, cmabClientHelper: CmabClientHelperAndroid) {
41+
this.client =
42+
Client(OptlyStorage(context), LoggerFactory.getLogger(OptlyStorage::class.java))
43+
this.cmabClientHelper = cmabClientHelper
44+
}
45+
4046
constructor(client: Client) {
4147
this.client = client
4248
this.cmabClientHelper = CmabClientHelperAndroid()

0 commit comments

Comments
 (0)