setup

fun setup(app: Application? = null, config: Config? = null)

Setup the snabble SDK.

First-time initialization is asynchronously. If the snabble SDK was already initialized before the callback will be invoked after decoding the persisted metadata and requires no network connection.

If you also want your first time usage to allow for no network scenarios, you must include the raw metadata from our backend to bundledMetadataAssetPath in the assets folder.

Parameters

app

Your main android application

config

Config provided. Minimal required fields are appId and secret. If no config is provided and the sdk was initialized before, a serialized version will be used.

If this is the first time you initialize the snabble SDK, a config must be set or the initialization will fail with Error.CONFIG_ERROR.