Skip to main content

Getting started: Environments and logging

Configure rook-sdk behaviour and logcat outputs.

Environment

The RookEnvironment enum allows to quickly configure the behaviour of rook-sdk, e.g. the api used to communicate with ROOK servers.

Available environments:

  • SANDBOX ➞ Use this during your app development process.
  • PRODUCTION ➞ Use this ONLY when your app is published to the PlayStore.

You can use the BuildConfig.DEBUG property of you app to configure the environment:

val environment = if (BuildConfig.DEBUG) RookEnvironment.SANDBOX else RookEnvironment.PRODUCTION

Logging

If you want to see the logs generated by this SDK, before setConfiguration call enableLocalLogs. You can use the BuildConfig.DEBUG property of you app to configure logging:

if (BuildConfig.DEBUG) {
rookConfigurationManager.enableLocalLogs()
}