steep-judge-98510
09/13/2022, 1:52 PMid
, 50%-50%, and whatever I do, I only seem to be able to receive defaultValue
, instead of the expected overrides (all the users are included in the experiment). Details in thread, do I miss something?staging
, just like the feature experimentval builder = GBSDKBuilderApp(
apiKey = API_KEY,
hostURL = HOST_URL,
attributes = mapOf("id" to userId),
trackingCallback = { _, _ -> } // TODO set later
)
builder.setRefreshHandler { isRefreshed ->
Log.d("growthbook", "refresh callback: $isRefreshed")
waiter?.resume(Unit)
waiter = null
}
val sdk = builder.initialize()
val beforeCont = sdk.feature("test_feature")
Log.d(
"growthbook",
"before cont: ${beforeCont.value}, ${beforeCont.source.name}",
)
suspendCoroutine<Unit> { continuation ->
Log.d("growthbook", "cont")
waiter = continuation
}
val afterCont = sdk.feature("test_feature")
Log.d(
"growthbook",
"after cont: ${afterCont.value}, ${afterCont.source.name}",
)
2022-09-13 15:49:15.916 D/growthbook: before cont: null, unknownFeature
2022-09-13 15:49:15.917 D/growthbook: cont
2022-09-13 15:49:16.372 D/growthbook: refresh callback: true
2022-09-13 15:49:16.373 D/growthbook: after cont: bar, defaultValue
coroutine
, and I am waiting until a refresh successfully completes, that is what the Continuation
stuff is about, and the result is visible, since before, it returns unknownFeature
, but after, defaultValue
<https://cdn.growthbook.io/api/features/API_KEY>
, the feature is visible as well:
"test_feature": {
"defaultValue": "bar",
"rules": [
{
"variations": [
"override",
"control"
],
"coverage": 1,
"weights": [
0.5,
0.5
],
"key": "test_feature",
"hashAttribute": "id"
}
]
}
future-teacher-7046
id
attribute you are passing into the SDK attributes?steep-judge-98510
09/13/2022, 2:02 PMLong
to be precisefuture-teacher-7046
steep-judge-98510
09/13/2022, 2:03 PMfuture-teacher-7046
steep-judge-98510
09/13/2022, 2:04 PMbillions-arm-13894
09/29/2022, 8:07 AM