
6 Manage devices
Parameter
Type
Description
devId
String
The device ID.
pcc
String
The category and type of
the device.
callback
IResultCallback
The callback.
Example
1
mTuyaBlueMesh
.
removeMeshSubDev
(
devBean
.
getDevId
() ,
new
IResultCallba
2
ck
(){
3
@Override
4
public
void
onError
(
String
code
,
String
errorMsg
) {
5
Toast
.
makeText
(
mContext
,
" Failed to remove a sub - device "
+
errorMsg
,
6
Toast
.
LENGTH_LONG
).
show
();
7
}
8
@Override
9
public
void
onSuccess
() {
10
Toast
.
makeText
(
mContext
,
"Sub - device removed successfully "
,
Toast
.
LE
11
NGTH_LONG
).
show
();
12
}
13
});
6.5 Query sub-device status
The data point (DP) information returned from the cloud might not be the real-time
data of the specified device. You can run the following command to query the cur-
rent DP value of the device. The result is returned by the method
onDpUpdate
of
IMeshDevListener
.
API description
1
void
querySubDevStatusByLocal
(
String
pcc
,
String
nodeId
,
IResultCall
2
back callback
);
Parameters
20 / 31