You can obtain device names and icons by using the following methods based on the communication mode:
1. Bluetooth Low Energy (Bluetooth LE) and dual-mode Bluetooth Use the name query application programming interface (API) and pass the productId and uuid parameters. Example: apiName: tuya.m.product.info.get 1.0 Parameters: "uuid" : "", // Use the UUID in the scanning callback object. "productId" : ""
2. Bluetooth mesh Use the name query API and pass the productId and mac parameters. Example: apiName: tuya.m.product.info.get 1.0 Parameters: "mac" : "", // Use the MAC address in the scanning callback bean. Make sure that you remove the colon (:) from the MAC address and the address is all in lower case. "productId" : ""
3. Gateway The SDK provides the function of detecting wired devices that are to be paired. Before obtaining the device information, you must connect the mobile phone to the same network as the device and register for the notification of wired devices. After the SDK receives the broadcast message of the wired device, it forwards the device information through a notification message. Then, you can call the preceding name query API to obtain the device information.