Last Updated on : 2024-05-14 02:46:14download
Routers and Wi-Fi devices that have Pegasus pairing enabled can be used to pair other Wi-Fi devices.
// Devices for Pegasus pairing found at home
ThingHomeSdk.getActivatorInstance().getSupportLightningActiveDevices(homeId)
val scanKey = ThingActivatorCoreKit.getScanDeviceManager().startLightningDeviceSearch(devIdList: List<String>? = null,
millisTimeOut: Long,
thingActivatorScanCallback: ThingActivatorScanCallback)
ThingActivatorCoreKit.getScanDeviceManager().stopScan(scankey)
Parameter description
Parameters | Description |
---|---|
devIds | The Pegasus server (a device that is paired) in the current home. |
millisTimeOut | The search timeout value, in milliseconds. |
thingActivatorScanCallback | The callback for the result. |
val builder = ThingDeviceActiveBuilder()
builder.lightningSearchBeans = lightningDeviceList
builder.timeout = 120L
builder.activeModel = ThingDeviceActiveModeEnum.Lightning
builder.listener = object : IThingDeviceActiveListener {
override fun onActiveError(errorBean: ThingDeviceActiveErrorBean) {
}
override fun onActiveLimited(limitBean: ThingDeviceActiveLimitBean) {
}
override fun onActiveSuccess(deviceBean: DeviceBean) {
}
override fun onBind(devId: String) {
}
override fun onFind(devId: String) {
}
}
val activeManager = ThingActivatorCoreKit.getActiveManager().newThingActiveManager()
activeManager.startActive(builder)
Parameter description
Parameters | Description |
---|---|
lightningSearchBeans | The list of discovered Pegasus devices. |
timeout | The pairing timeout value, in seconds. |
activeModel | The pairing capability enum. |
listener | The callback for the result of pairing. |
activeManager.stopActive()
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback