SDKJava (Android) SDK

Debug logs

Android Java SDK: Debug logs

Current version · 1.4.0

Debug logs

Choose debug modules and detail through SdkConfig.builder().debug(...) before constructing the SDK. Start with summary information and increase detail only when needed.

Build the value with DebugConfig.builder().modules(...).detail(...).sampleRate(...).build() and pass it to SdkConfig.builder().debug(). sampleRate controls debug sampling, not device or subscription frequency. Modules include TRANSPORT, DEVICE, CAPTURE, CALIBRATION, RETARGETING and OUTPUT; detail is SUMMARY or FULL.

The public Exo examples do not include a debug-trace class. The DeviceInfo example below records the product, firmware, protocol, serial number, component counts and capability context to attach to a report.

import android.content.Context;
import com.qnbot.sdk.Sdk;
import com.qnbot.sdk.SdkConfig;
import com.qnbot.sdk.android.SerialTransport;
import com.qnbot.sdk.config.SerialConnection;
import com.qnbot.sdk.exo.Exo;
import com.qnbot.sdk.exo.ExoConfig;
import com.qnbot.sdk.exo.ExoDeviceInfo;

/**
 * Reads Exo product, firmware, component and capability information before start.
 *
 * <p>Supply an Android {@link Context}, an authorized {@link SerialTransport} and the device
 * port; the SDK closes when the read completes.
 */
public final class DeviceInfo {
  private DeviceInfo() {}

  public static void run(Context context, SerialTransport transport, String port) throws Exception {
    SdkConfig config = SdkConfig.builder()
                           .device(ExoConfig.builder()
                                       .connection(SerialConnection.port(port))
                                       .build())
                           .build();
    try (Sdk sdk = new Sdk(config, context, transport); Exo exo = sdk.exo()) {
      ExoDeviceInfo info = exo.device().getDeviceInfo();
      System.out.println("product=" + info.product + " protocol=" + info.protocolVersion.major + "."
          + info.protocolVersion.minor + " serial=" + info.serialNumber
          + " hardware=" + info.hardwareName);
      System.out.println("firmware=" + info.firmware.platform + "." + info.firmware.revision + "."
          + info.firmware.feature + "." + info.firmware.build);
      System.out.println("encoders=" + info.components.encoders.available + "/"
          + info.components.encoders.totalSlots + " handsets=" + info.components.handsets.available
          + "/" + info.components.handsets.totalSlots + " imus=" + info.components.imus.available
          + "/" + info.components.imus.totalSlots);
      System.out.println("capabilities telemetry=" + info.capabilities.telemetry
          + " encoders=" + info.capabilities.encoders + " handsets=" + info.capabilities.handsets
          + " imus=" + info.capabilities.imus + " haptics=" + info.capabilities.haptics
          + " wireless=" + info.capabilities.wireless);
    }
  }
}

Also record sdk.health() or device.health() and app logs around the problem. Avoid printing full payloads on every high-rate callback.

SDK update notices

Enabled Stable and RC Android deliveries check the corresponding Glove or Exo OTA catalog for a newer stable version at the component's first start. Dev versions skip checks; the SDK provides no independent Core update notice. Inspect update_checks_enabled in the delivery record.

View INFO notices with:

adb logcat -s qnbot-sdk:I

An applicable update produces an update_available line containing the component, installed version, available version and HTTPS upgrade source. The SDK does not download or install updates; upgrade the complete Maven dependency using your delivery instructions.

Each first-component-start boundary shares at most a one-second check budget. Repeated stop/start in the same instance does not recheck. Offline, timeout, malformed responses or no update produce no notice and leave connections/capture running. Keep start on a worker and include the bounded wait in app startup budgets.

Ordinary source builds disable checks by default; use --enable-update-checks at build time to enable them. An unavailable or invalid OTA catalog silently skips runtime notices and does not block the build. The switch does not establish official delivery availability; use the versions and configuration recorded in your actual matching delivery.