This document is deprecated, please go to Tuya Developer Documentation Center to view the latest version: Tuya Smart Doc - Android SDK

1. Tuya Smart Lock Android SDK

Tuya smart lock Android The SDK provides function packaging with smart door lock devices to speed up and simplify the development process of door lock application functions, including the following functions:

  • Door lock user system (including lock user management, associated password, etc.)
  • Door lock password unlocking (including dynamic password, temporary password management, etc.)
  • Door lock usage records (including door lock unlock records, doorbell records, alarm records, etc.)

1.1. Preparation

Tuya lock SDK is based on Tuya Smart Home SDK.

Before integrating Tuya Lock SDK, you need to do the following:

  • Integrate TuyaHomeSdk (including application for tuya App ID and App Secret, security image configuration related environment),please read Tuya Smart Home SDK Document

  • Activation of the door lock device

1.2. Fast Integration

1.2.1. Add Dependency

Add the door lock SDK dependency in the dependencies of build.gradle in the module layer

dependencies {
   implementation ''

1.2.2. Permissions

In order to scan and connect Bluetooth devices, you need to add the following permissions to AndroidManifest.xml.

<!-- Required. Allows applications to connect to paired bluetooth devices.  -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Required. Allows applications to discover and pair bluetooth devices.  -->
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<!-- Required.  Allows an app to scan bluetooth device.  -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required.  Allows an app to scan bluetooth device.  -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!--  Allows an app to use bluetooth low energy feature  -->
    android:required="false" />

You can refer to the documentation for dynamic permission acquisition,Request App Permissions

results matching ""

    No results matching ""