There are 2 ways to initialize the SDK:
Option 1 | Pass a configuration object
- Create a configuration object called
ConfigModel
:
val config = ConfigModel(
checkoutPublicKey = "XXXXXXXxxxxxxxXXXXXXXxxxxxxXXXXXXXX",
environment = "sandbox", // "sandbox" or "production"
customerId = "PLAYER_ID"
)
Argument | Type | Required? | Description |
---|---|---|---|
checkoutPublicKey | string | Yes | The checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value. |
environment | string | Yes | The checkout environment. One of: - sandbox : For testing.- production : For live operations. |
customerId | string | Yes | The player ID. |
- Initialize the SDK with the
ConfigModel
:
bridgeAPI.init(context: Context, config: ConfigModel, callback: IUpdateCallback) {...}
Argument | Type | Description |
---|---|---|
context | android.content.Context | The current Activity context. |
config | ConfigModel | Configuration options for the initialization. |
callback | IUpdateCallback | Interface callback. |
Option 2 | Pass arguments directly
Initialize the SDK with the individual arguments:
bridgeAPI.init(
context: Context,
environment: String,
checkoutPublicKey: String,
customerId: String,
callback: IUpdateCallback
) {...}
Argument | Type | Description |
---|---|---|
context | android.content.Context | The current Activity context. |
environment | String | The checkout environment. One of: - sandbox : For testing.- production : For live operations. |
checkoutPublicKey | String | The checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value. |
customerId | String | The player ID. |
callback | IUpdateCallback | Interface callback. |