Last Updated on : 2024-05-16 06:44:10download
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 Cube SDK, for more information about accessing to the Tuya Smart Sweeper SDK method, see Tuya Cube SDK Integration.
At present, the sweeper SDK supports three types of gyro, vision, and laser sweeping robots.
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 Cube 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 Developer Platform, and obtain a key to activate the SDK, see Tuya Cube Android SDK Integration.
Please contact the project manager to obtain the Tuya Maven repository URL account and password.
Add in repositories:
// Tuya Maven repository URL.
maven {
url 'https://maven-other.tuya.com/repository/maven-private/'
credentials {
username ?
password ?
}
}
Add the following codes to the build.gradle file.
dependencies{
implementation 'com.tuya.smart:sweeper:5.1.0-cube'
}
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