Launching the SDK with configuration
You can setup VWO Config while initializing your VWO SDK. This is helpful if you want to do the following:
Map<String, String> userSegmentationMapping = new HashMap<>();
userSegmentationMapping.put("user_type", "paid");
VWOConfig vwoConfig = new VWOConfig
.Builder()
.setCustomVariables(userSegmentationMapping)
.disablePreview()
.setOptOut(true)
.build();
val userSegmentationMapping = mutableMapOf<String, String>()
userSegmentationMapping["key"] = "value"
val vwoConfig = VWOConfig.Builder()
.setCustomVariables(userSegmentationMapping)
.disablePreview() // To disable preview mode
.setOptOut(true) // To opt out of VWO SDK
.build()
This configuration can set during SDK initialization as follows:
VWO.with(this, VWO_API_KEY).config(vwoConfig).launch(null);
VWO.with(this, VWO_API_KEY).config(vwoConfig).launch(null)