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.
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:
OTVLog.setLogLevel(OTVLog.LOG_LEVEL_INFO); will enable
LOG_LEVEL_INFO messages but not
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
Configure the log capture to include timestamps; for example:
adb -d logcat -v threadtime > \path\to\logfile.logTEXT