Device Pairing SDK (With UI) Integration

1. Overview

This document describes the pairing types supported by the Device Pairing SDK, its dependency composition, and how to integrate the Device Pairing SDK (with UI).

2. Prerequisites

  1. Complete Preparation
  2. Complete Environment Build

3. Features

3.1 Main capabilities

The Device Pairing SDK (with UI) mainly provides the ability to configure Aqara devices onto a router and complete cloud activation. The pairing flow is presented with Aqara-style UI pages.

3.2 Supported onboarding types

Onboarding type Supported Description
MagicPair pairing Supported See MagicPair Pairing
Wi-Fi AP pairing Supported See Wi-Fi Pairing
Ethernet wired pairing Supported See Ethernet Wired Pairing
Bluetooth pairing Supported See Bluetooth Pairing
Zigbee child device pairing Not supported Implement via APIs in the third-party app; see Zigbee Child Device Pairing
Matter pairing Not supported Use the Matter vertical category SDK; see Matter Category
Camera pairing Not supported Use the Camera vertical category SDK; see Camera Category
Door lock pairing Not supported Use the Door Lock vertical category SDK; see Door Lock Category

3.3 Supported device list

See Device Pairing SDK Supported Device List

4. Integration

4.1 Open the Android Studio project

4.2 Edit build.gradle in the app module

After completing Environment Build, add the device pairing dependencies:

dependencies {
    // Core / CommonUI (already added in Environment Build)
    implementation 'com.lumi.external:core:2.2.62'
    implementation 'com.lumi.commonui:ui:1.5.33'

    // Device Pairing SDK (with UI)
    implementation 'com.lumi.module.access:access:3.5.82'
    implementation 'com.lumi.module.smart_connect:connect:4.0.37'
    implementation 'com.lumi.module:scanQR:1.0.14'
    implementation 'com.lumi.module:devicekit:1.0.23'
    implementation 'com.lumi.api:thread:1.0.21'
}

If you also integrate scan and IR modules, zxing conflicts may occur; exclude as needed:

configurations.configureEach {
    exclude group: 'com.google.zxing', module: 'core'
}

4.3 Initialization

See Environment Build - Unified Initialization.

Before pairing, make sure the following are configured correctly:

  • positionInfo (home / position ID)
  • coapServer (device onboarding domain that matches the current service region)
  • country / area / supportDeviceArea (recommended: determine country first, then look up the others; see Region Comparison Table)

5. Usage

5.1 Navigate to the pairing page for a specific device

After unified initialization, use LumiAccessSDKManager to launch the pairing UI for a specific device model:

Kotlin

LumiAccessSDKManager.getInstance().gotoAccessConfigModule(
    this,
    "lumi.gateway.agl008", // deviceModel; see the supported device list
    object : LumiResultCallBack {
        override fun fail(errorCode: Int?, errorMessage: String?) {
            // Pairing failed
        }

        override fun success(activity: WeakReference<Activity>, message: String?) {
            // Pairing succeeded. You can close the pairing page at an appropriate time:
            activity.get()?.finish()
        }
    }
)

Java

LumiAccessSDKManager.getInstance().gotoAccessConfigModule(
        this,
        "lumi.gateway.agl008",
        new LumiResultCallBack() {
            @Override
            public void fail(@Nullable Integer errorCode, @Nullable String errorMessage) {
                // Pairing failed
            }

            @Override
            public void success(@NonNull WeakReference<Activity> activity, @Nullable String message) {
                // Pairing succeeded. You can close the pairing page at an appropriate time:
                Activity page = activity.get();
                if (page != null) {
                    page.finish();
                }
            }
        }
);

Parameter description

Field Data type Description How to obtain
deviceModel String Device model value See Device Pairing SDK Supported Device List
lumi LogoCopyright © 2023 Lumi United Technology Co., Ltd. all right reserved,powered by GitbookFile Modify: 2026-08-11 17:03:05

results matching ""

    No results matching ""