Last Updated on : 2023-06-27 08:25:15download
Tuya Smart Sweeper SDK provides related interfaces for sweeping robots to help developers obtain functions such as sweeping maps, paths, and historical maps. Tuya Smart Sweeper SDK relies on Tuya Smart SDK, for more information about accessing to the Tuya Smart Sweeper SDK method, see Tuya Smart Home SDK Integration.
At present, the sweeper SDK supports three types of gyro, vision, and laser sweeping robots. For more information, see Terms.
The sweeper SDK provides real-time data channel capability and full data acquisition capability.
The real-time data of the gyroscope and the visual sweeper are acquired by data flow, and the incremental data of the sweep is reported by the machine in real-time through the MQTT protocol.
The real-time data of the laser sweeper is a full amount of data. Due to a large amount of data, it is not suitable for MQTT streaming service to transfer data. In fact, the machine uploads the full amount of data (maps and routes) to the OSS server, stores them in bin format files, and notifies the App of the file path on the OSS server through MQTT.
Tuya Smart Sweeper Android SDK relies on the Tuya Smart Home Android SDK, and develop on this basis. Before starting to develop with the SDK, you need to register a developer account, create a product, etc. on the Tuya Smart IoT Platform, and obtain a key to activate the SDK, see Tuya Smart Home Android SDK Integration.
Add in repositories:
maven {
url 'https://maven-other.tuya.com/repository/maven-private/'
credentials {
username "xxxxxx"
password "xxxxxx"
}
}
maven { url "https://maven-other.tuya.com/repository/maven-releases/" }
maven { url "https://maven-other.tuya.com/repository/maven-commercial-releases/" }
Add the following codes to the build.gradle file.
dependencies{
implementation 'com.tuya.smart:sweeper:2.0.0-cube.1'
}
ThingHomeSdk.init(appliction); // Home sdk init
TuyaOptimusSdk.init(appliction); //Sweeper SDK init
IThingSweeperKitSdk
: provides the data capability entrance of the laser sweeper and the download function of voice packets.
Call method:
IThingSweeperKitSdk iTuyaSweeperKitSdk = TuyaOptimusSdk.getManager(IThingSweeperKitSdk.class);
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback