
4 Manage mesh networks
1
// Starts a connection .
2
TuyaHomeSdk
.
getTuyaBlueMeshClient
().
startClient
(
mBlueMeshBean
);
3
// Closes a connection .
4
TuyaHomeSdk
.
getTuyaBlueMeshClient
().
stopClient
();
5
// Starts scanning .
6
TuyaHomeSdk
.
getTuyaBlueMeshClient
().
startSearch
()
7
// Stops scanning .
8
TuyaHomeSdk
.
getTuyaBlueMeshClient
().
stopSearch
();
:::important
• After a connection is started, available devices are scanned for in the back-
ground until a device is connected.
• The background scanning will consume resources. You can start and stop scan-
ning to control the background scanning.
• Before a connection is started with
startClient
()
, the API methods of
startSearch
()
and
stopSearch
()
are invalid.
• After a mesh network is connected, the API methods of
startSearch
()
and
stopSearch
()
are also invalid. :::
9 / 31