5 Pair devices
1
// Pairs a common mesh device .
2
TuyaBlueMeshActivatorBuilder tuyaBlueMeshActivatorBuilder
=
new
Tuya
3
BlueMeshActivatorBuilder
()
4
.
setSearchDeviceBeans
(
foundDevices
)
5
.
setVersion
(
"1.0"
)
6
.
setBlueMeshBean
(
mMeshBean
)
7
.
setTimeOut
(
timeOut
)
8
.
setTuyaBlueMeshActivatorListener
(
new
ITuyaBlueMeshActivatorListener
9
() {
10
@Override
11
public
void
onSuccess
(
DeviceBean deviceBean
) {
12
}
13
@Override
14
public
void
onError
(
String
errorCode
,
String
errorMsg
) {
15
}
16
@Override
17
public
void
onFinish
() {
18
}});
19
ITuyaBlueMeshActivator iTuyaBlueMeshActivator
=
TuyaHomeSdk
.
getTuyaB
20
lueMeshConfig
().
newActivator
(
tuyaBlueMeshActivatorBuilder
);
21
// Starts pairing .
22
iTuyaBlueMeshActivator
.
startActivator
();
23
// Stops pairing .
24
iTuyaBlueMeshActivator
.
stopActivator
();
5.4 Pair a mesh gateway
API description
1
// Starts pairing .
2
void
startActivator
();
3
// Stops pairing .
4
void
stopActivator
();
Parameters
13 / 31