Skip to main content
Skip table of contents

Debugging

Using Android Studio debugger

With the integration.aar, you can use breakpoints and view variable values in Android Studio debugger. You cannot place breakpoints within the library code itself.

Logging levels

The code within the SDK outputs text logs that can be viewed through the logcat window of Android Studio or using the logcat ADB command line. You can control the verbosity of most of the SDK log outputs through the OTVLog.setLogLevel(int logLevel) static method. The available levels are:

  • LOG_LEVEL_INFO (1)

  • LOG_LEVEL_DEBUG (2)

  • LOG_LEVEL_VERBOSE (3)

For example, OTVLog.setLogLevel(OTVLog.LOG_LEVEL_INFO); will enable LOG_LEVEL_INFO messages but not LOG_LEVEL_DEBUG or LOG_LEVEL_VERBOSE.

The default debug levels set are LOG_LEVEL_INFO for the production.aar, and LOG_LEVEL_VERBOSE for the integration.aar.

The log level of the SDK also affects other internal modules' log levels (e.g. PRM libraries). However, the log level settings of these modules take place only during their initialisation. Therefore, overriding of the SDK log levels using OTVLog.setLogLevel() will only affect the other modules if the override happens before the modules' intialisation.

Capturing the logs

You can capture the output logs into a log file for later analysis. Using the Android Debug Bridge (ADB) and its internal logcat command, capture the records into a file from the terminal's command-line (cmd in Windows, Terminal on a Mac). When raising a ticket with NAGRA, you may be requested to provide a log capture. In such cases, you would be asked to:

  • Capture logs from before the application is launched until it is terminated.

  • Have log verbosity set to LOG_LEVEL_VERBOSE (3)

  • Configure the log capture to include timestamps; for example:

    BASH
     adb -d logcat -v threadtime > \path\to\logfile.log
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.