Sweeper SDK

Last Updated on : 2024-04-16 01:55:19download

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.

Overview

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.

Preparation for integration

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.

Configure the root build.gradle

Add in repositories:

maven {
  url "https://maven-other.tuya.com/repository/maven-releases/"
}

Configure the build.gradle

Add the following codes to the build.gradle file.

dependencies{
implementation 'com.thingclips.smart:sweeper:5.1.0-9'
}

SDK initialization

ThingHomeSdk.init(appliction); // Home sdk init
ThingOptimusSdk.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 = ThingOptimusSdk.getManager(IThingSweeperKitSdk.class);