Initializing the SDK

To use the SDK’s methods and classes, your application must call the SDK’s initialise method to initialize the MobileCredentialVerifier class:

Initializing the SDK
MobileCredentialVerifier.initialise(activity)

Configure logger behavior

You can configure the SDK’s logger behavior using the optional loggerConfiguration parameter:

Configure logger behavior
MobileCredentialVerifier.initialise(
    activity,
    loggerConfiguration = Logger.LoggerConfiguration(
        logLevel = Logger.LogLevel.DEBUG,
        callbackLogLevel = Logger.LogLevel.DEBUG,
        callback = { priority, tag, message, error ->
            Logger.d("Perform any custom action with the log event: $message")
        }
    )
)
  • logLevel : Determines which events are written to log files:
  • callbackLogLevel : Determines which events invoke the callback function:
  • callback : Defines the function to call when events defined by callbackLogLevel occur.

Logging levels

These levels apply to both the logLevel and callbackLogLevel parameters (corresponding raw value in shown in parenthesis):

  • Off (7).
  • Assert (7).
  • Error (6).
  • Warning (5).
  • Info (4).
  • Debug (3).
  • Verbose (2).