SdkConfig

class SdkConfig

How the SDK is set up. Build one and hand it to CGS.init.

SdkConfig.Builder(context)
.environment(CgsEnvironment.PRODUCTION)
.productName("YOUR_PRODUCT_NAME")
.apiKey("YOUR_LICENSE_KEY")
.onSessionLost { promptSignIn() }
.build()

Only the Context is required. The API key can come from the manifest instead:

<application ... >
<meta-data
android:name="co.cafeyn.cgs.license"
android:value="YOUR_LICENSE_KEY" />
</application>

The configuration is read once, at CGS.init. Changing anything afterwards means CGS.shutdown and initializing again.

Types

Link copied to clipboard
class Builder(context: Context)

Builds an SdkConfig.