tuya Smart Life App SDK User Guide

July 31, 2024
Tuya

Smart Life App SDK

“`html

Specifications

  • Product: IPC SDK for Android
  • Version: 20240705

Product Information

The IPC SDK helps implement IP camera functionalities on top of
Smart Life App SDK modules, including user management, device
pairing, home management, and device management.

Product Usage Instructions

1. Before You Start

The IPC SDK is based on the Smart Life App SDK. Ensure you have
performed the integration steps described in Fast Integration with
Smart Life App SDK for Android. The Smart Life App SDK version to
be integrated must be v5.14.0 or later.

2. Fast Integration

2.1 Configure build.gradle

Update the build.gradle file with the provided configuration
settings. Ensure proper repository URLs and dependencies are set up
for the IPC SDK.

2.2 Configure AndroidManifest.xml

Add necessary permissions to the AndroidManifest.xml file as
specified in the instructions to ensure proper functionality of the
IPC SDK.

2.3 Obfuscate the code

Configure obfuscation settings in proguard-rules.pro to protect
the code. Follow the provided guidelines to obfuscate the necessary
classes.

3. Demo App

The IPC SDK demo app includes a control panel module for IPCs,
allowing implementation of various pages based on Smart Life App
SDK features.

FAQ

Q: What is the IPC SDK for Android?

A: The IPC SDK helps implement IP camera functionalities on top
of Smart Life App SDK modules.

“`

Fast Integration with IPC SDK for Android
Version: 20240705
Online Version

Contents

Contents

1 Before you start

2

2 Fast integration

3

2.1 Configure build.gradle . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.2 Configure AndroidManifest.xml . . . . . . . . . . . . . . . . . . . . . . 4

2.3 Obfuscate the code . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Demo app

5

I

Contents IPC SDK helps you implement IP camera (IPC) functionalities on top of the modules provided by Smart Life App SDK, such as user management, device pairing, home management, and device management.
1/5

1 Before you start
1 Before you start
The IPC SDK is developed based on the Smart Life App SDK. Before integration with the IPC SDK, perform the steps described in Fast Integration with Smart Life App SDK for Android. Starting from IPC SDK v5.14.1, the Smart Life App SDK to be integrated must be v5.14.0 or later.
2/5

2 Fast integration
2 Fast integration
2.1 Configure build.gradle
· Configure the file build.gradle in the root directory of your project.

1 allprojects {

2

repositories {

3

4

maven {

5

url “https://maven-other.tuya.com/repository/maven-

relea

6 ses/”

7

}

8

maven { url “https://maven-other.tuya.com/repository/maven

-c

9 ommercial -releases/” }

10

11

}

12 }

· Configure build.gradle in the app directory.

1 defaultConfig {

2

ndk {

3

abiFilters “armeabi -v7a”,”arm64-v8a”

4

}

5}

6 packagingOptions {

7

pickFirst ‘lib/*/libc++_shared.so’

8

pickFirst ‘lib/*/libyuv.so’

9

pickFirst ‘lib/*/libopenh264.so’

10 }

11 dependencies {

12

13

implementation ‘com.thingclips.smart:thingsmart -ipcsdk:5.14.1’

14

15 }

:::important
­ The earliest Android version supported by the IPC SDK is Android 6.0.0 (API level 21).
­ The IPC SDK supports armeabi-v7a and arm64-v8a by default.

3/5

2 Fast integration ­ The IPC SDK does not support P2P 1.0 devices by default. In this case,
the value of p2pType for this type of device is 1. To use this type of device, contact Tuya’s account manager to update the device firmware. ­ If you have integrated Smart Life App SDK v3.x.x or v4.x.x into your project, follow the instructions in Upgrade Guide and upgrade to the latest version. :::
2.2 Configure AndroidManifest.xml
Set permissions in AndroidManifest.xml. 1 <!– sdcard –> 2 <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STO 3 RAGE” /> 4 <uses- permission android:name=”android.permission.READ_EXTERNAL_STOR 5 AGE” /> 6 <!– Network –> 7 8 <uses-permission android:name=”android.permission.CHANGE_NETWORK_STA 9 TE” />
10 <uses – permission android :name=” android . permission . CHANGE_WIFI_STATE ” 11 /> 12 <uses – permission android :name=” android . permission . ACCESS_NETWORK_STA 13 TE” /> 14 <uses – permission android :name=” android . permission . ACCESS_WIFI_STATE ” 15 /> 16 <uses – permission android :name=” android . permission . RECORD_AUDIO ” /> 17 <uses – permission android :name=” android . permission . MODIFY_AUDIO_SETTI 18 NGS” />
2.3 Obfuscate the code
Configure obfuscation in proguard-rules.pro. 1 -keep class com.thingclips.*{;} 2 -dontwarn com.thingclips.**
4/5

3 Demo app
3 Demo app
Based on the features of the Smart Life App SDK demo app, the IPC SDK demo app is added with the control panel module for IPCs to implement the following pages:
· Live streaming: P2P connections of IPCs, live video playing, video recording, screenshot capturing, video talks, and more.
· Playback: retrieval and playback of video footage from an SD card, and use of timeline components.
· Cloud Storage for Videos: service subscription, status query, and retrieval and playback of cloud-stored videos and cloud storage events.
· Messages: retrieval and display of alerts. · Settings: use of standard data points for IPCs. 1 :::important 2 The demo app that is created in the sample project of Smart Life App 3 SDK is used for reference only. Do not use the demo app for commerc 4 ial purposes. For more information , see [Tuya Developing Service Agr 5 eement](https://www.tuya.com/vas/contract?file=oceanus%2Ffil e%2F7a8f 6 b738 -f5d0 -59d2-b0b3 -56af64685b71.md). 7 :::
5/5

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals