Skip to content

OptimizelyManager Builder requires projectId or sdkKey #355

Closed
@kevinzetterstrom

Description

@kevinzetterstrom

Right now the OptimizelyManager.Builder requires either a projectId or a sdkKey. If neither are provided, build() will return null. One of these are required so that if a DatafileConfig is not provided, one can be created. However, if a DatafileConfig is provided, then neither projectId or sdkKey should be necessary.
For instance, if one was to create an OptimizelyManager as such, then sdkKey or projectId should not be required.

val sdkKey = "myKey"
val datafileConfig = DatafileConfig(null, sdkKey, OPTIMIZELY_DATAFILE_HOST)
val optimizelyManager = OptimizelyManager.builder()
  .withDatafileConfig(datafileConfig)
  .withSDKKey(sdkKey) // not needed since we provide a DatafileConfig, but if not provided, build() returns null
  .build(context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions