Camera SDK Usage
1. Overview
This article mainly introduces how to use the Camera Vertical Category SDK for pairing and device control.
2. Prerequisites
- Complete Preparation
- Complete Environment Build
- Complete Camera SDK Integration
3. Usage
3.1 Jump to the camera pairing page
After unified initialization is complete, you can launch the pairing UI for a specified camera model through LumiAccessSDKManager:
Kotlin
LumiAccessSDKManager.getInstance().gotoAccessConfigModule(
this,
"lumi.camera.agl006", // 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. After success, you can close the pairing page at an appropriate time:
activity.get()?.finish()
// message usually contains information such as did / model / deviceName, which can be parsed as needed
}
}
)
Parameter Description
| Field | Type of data | Description | Access channel |
|---|---|---|---|
| deviceModel | String | Device model value | See Camera SDK Supported Device List |
Home position,
coapServer, and related parameters are already passed during unified initialization and do not need to be passed again in the jump API. For more pairing details, see also Device Pairing SDK (With UI) Integration.
3.2 Jump to the camera control page
3.2.1 Open through device routing
LumiDeviceRouterManager.getInstance().startDevicePage(
"deviceModel",
"deviceId"
)
Parameter Description
| Field | Type of data | Description | Access channel |
|---|---|---|---|
| deviceModel | String | Device model value | See Camera SDK Supported Device List |
| deviceId | String | Device Id | Cloud interface; generated after the device is successfully paired |
3.3 Device plugin
3.3.1 Depend on local plugin files
The SDK supports loading local plugin files. You only need to place the corresponding files in the directory.
Place the plugin and configuration files under the assets/lumi/ directory.
When relying on local plugins, the plugin will not be updated from the cloud. If an update is required, you need to place the new version of the RN plugin into the assets directory yourself, then rebuild and release.
3.3.2 Depend on remote plugin files
The SDK supports loading remote plugin files hosted on the server, and supports hot updates. It can be used together with local plugins.
This feature involves the management and delivery of remote plugin files and is not currently available externally. If you have requirements, please contact business.