Last Updated on : 2023-03-29 02:40:43download
IPC SDK for Android 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.
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.
build.gradle
Configure the file build.gradle
in the root directory of your project.
allprojects {
repositories {
...
maven {
url "https://maven-other.tuya.com/repository/maven-releases/"
}
...
}
}
Configure build.gradle
in the app
directory.
defaultConfig {
ndk {
abiFilters "armeabi-v7a","arm64-v8a"
}
}
packagingOptions {
pickFirst 'lib/*/libc++_shared.so'
pickFirst 'lib/*/libyuv.so'
pickFirst 'lib/*/libopenh264.so'
}
dependencies {
...
implementation 'com.tuya.smart:tuyasmart-ipcsdk:4.0.0-4'
...
}
armeabi-v7a
and arm64-v8a
by default.p2pType
for this type of device is 1
. To support this type of device, add the dependency implementation 'com.tuya.smart:tuyasmart-ipc-camera-v1:3.20.0'
.AndroidManifest.xml
Set permissions in AndroidManifest.xml
.
<!-- sdcard -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Network -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
Configure obfuscation in proguard-rules.pro
.
-keep class com.tuyasmart.**{*;}
-dontwarn com.tuyasmart.**
For P2P 1.0 devices (p2pType
is 1
), add the following obfuscation rules:
-keep class com.tutk.**{*;}
-dontwarn com.tutk.**
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:
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback