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

1. Camera device

After obtaining the device list, you can determine whether it is a smart camera device according to the type of device. If it is a smart camera device, you can create a camera object based on the information in DeviceBean.

1.1.1. Determine if it is a smart camera

Declaration

Determine if it is a smart camera.

boolean isIPCDevice(String devId);

Example

ITuyaIPCCore cameraInstance = TuyaIPCSdk.getCameraInstance();
if (cameraInstance != null) {
    cameraInstance.isIPCDevice(devId)
}

1.1.2. P2p type

The Tuya smart camera supports three p2p channel implementation solutions. The IPC SDK will initialize different camera objects according to the p2p type. Obtain the p2p type of the device as follows:

Declaration

get p2p type of device.

int getP2PType(String devId);

Example

ITuyaIPCCore cameraInstance = TuyaIPCSdk.getCameraInstance();
if (cameraInstance != null) {
    cameraInstance.getP2PType(devId)
}

results matching ""

    No results matching ""