init

fun init(config: SdkConfig)

Initializes the SDK. Call once, as early as possible — Application.onCreate is the natural place.

The license and product name are validated here, so a bad setup fails at startup rather than at the first content request. Nothing is fetched and no session is opened: authenticate with auth once you have a token.

Calling this again after a successful initialization does nothing — the SDK keeps the configuration it already has, and the one passed in is discarded.

Parameters

config

the full SDK configuration, built with SdkConfig.Builder.

Throws

if no license was found, in config or in the manifest.

if the license that was found is not valid.