Skip to main content

Getting started: Environments and logging

Configure rook-sdk-samsung behaviour and logcat outputs.

Environment​

The SHEnvironment 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) SHEnvironment.SANDBOX else SHEnvironment.PRODUCTION

Logging​

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

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