中文简体 English
- Aiwei IoT Android interface documentation
- 1.initialization
- 1.1 Set SDK logs
- 1.2 Set app layer logging
- 1.3 SDK initialization
- 1.4 SDK version number
- 1.5 Set Account Region
- 2.Add Device
- 2.1 LAN search
- 2.2 Add QR Code
- 2.2.1 Add QR Code
- 2.2.2 Add QR Code(token)
- 2.2.3 Add QR Code(token+No distinction between domestic and foreign)
- 2.3 Sound Wave Added
- 2.3.1 Add With UID
- 2.3.2 Add Without UID
- 2.3.3 Sound wave addition with token and without distinction between domestic and foreign
- 3.Device connection
- 3.1 Login device
- 3.2 Get connection handle
- 3.3 Device connection status
- 3.4 Release the connection
- 3.5 Modify device username and password
- 3.6 Device event listener
- 3.6.1 Bind event listener
- 3.6.1 Unbind event listener
- 3.7 Obtain factory password based on device uid
- 4. Equipment basic information
- 4.1 Get device information
- 4.2 Get Device Capability Set
- 5. Real-time playback related
- 5.1 Live playback
- 5.1.1 Turn on live playback
- 5.1.2 Turn off real-time playback
- 5.1.3 Capture
- 5.2 Sharpness switch
- 5.2.1 Get the stream type
- 5.2.2 Set the stream type
- 5.2.3 Get resolution configuration
- 5.2.4 Set sharpness
- 5.2.5 Substream switching
- 5.3 Monitoring
- 5.3.1 Turn on monitoring
- 5.3.2 Turn off monitoring
- 5.4 Intercom
- 5.4.1 Open Intercom
- 5.4.2 Turn off intercom
- 5.5 Local recording
- 5.5.1 Start recording
- 5.5.2 Stop recording
- 5.6 Mirror flip
- 5.6.1 Get mirror rollover configuration
- 5.6.2 Set video flip
- 5.6.3 Setting up video mirroring
- 5.7 IR Mode
- 5.7.1 Get IR Mode
- 5.7.2 Set infrared mode
- 5.8 PTZ related
- 5.8.1 PTZ Control
- 5.8.2 PTZ preset position acquisition
- 5.8.3 Execute PTZ preset
- 5.8.4 Add Preset
- 5.8.5 Delete Preset
- 5.8.6 Execute cruise
- 5.8.7 Stop Cruise
- 6. SD card
- 6.1 Basic operation of SD card
- 6.1.1 Query SD card information
- 6.1.2 Format SD card
- 6.2 SD card playback
- 6.2.1 Query SD card recording
- 6.2.2 Open SD card video playback
- 6.2.3 Disable SD card video playback
- 6.2.3 SD card video playback pause
- 6.2.4 SD card video playback resume playback
- 6.2.5 SD card video playback drag play
- 6.2.6 Open SD card video playback audio
- 6.2.7 Disable SD card video playback audio
- 6.3 SD card video download
- 6.3.1 SD card video download
- 6.3.2 Cancel download SD card video
- 7. Device Settings
- 7.1 Network
- 7.1.1 Get device WiFi list
- 7.1.2 Get device WiFi information
- 7.1.3 Set device WiFi information
- 7.1.4 Get network adaptation status
- 7.1.5 Set network adaptive state
- 7.2 Time synchronization
- 7.2.1 Get device system time
- 7.3.2 Set device volume
- 7.4 Detection related
- 7.4.1 Motion Detection
- 7.4.1.1 Get motion detection configuration
- 7.4.1.2 Set motion detection configuration
- 7.4.2 Sound Detection
- 7.4.2.1 Get sound detection configuration
- 7.4.2.2 Set sound detection configuration
- 7.4.3 Human Detection
- 7.4.3.1 Get humanoid detection configuration
- 7.4.3.2 Set the humanoid detection configuration
- 7.4.3.3 Obtaining a license from the device
- 7.4.3.4 Write license to device
- 7.5 Device Hibernation
- 7.5.1 Get hibernation
- 7.5.2 Device Wakeup
- 7.5.3 Device Wakeup
- 7.6 Reboot the device
- 7.7 WDR switch
- 7.7.1 Get the WDR switch
- 7.7.2 Setting the WDR switch
- 7.8 Power frequency
- 7.8.1 Get power frequency
- 7.8.1 Setting the power frequency
- 7.9 Beep Switch
- 7.9.1 Get the sound switch status
- 7.9.2 Set the status of the beep switch
- 7.10 Status Light Switch
- 7.10.1 Get status light switch status
- 7.10.2 Set status light switch status
- 7.11 OSD Settings
- 7.11.1 Get OSD
- 7.11.1 Setting the OSD
- 7.12 Night Vision Project
- 7.12.1 Get night vision plan
- 7.12.2 Setting the night vision schedule
- 7.13 Schedule Recording
- 7.13.1 Get Scheduled Recording Configuration
- 7.13.2 Set Scheduled Recording Configuration
- 7.14 Cloud configuration related
- 7.14.1 Online firmware upgrade
- 7.14.2 Set push configuration
- 7.14.3 Set up cloud storage configuration
- 8. Generic interface
- 8.1 SDK common interface
- 8.2 cgi commands
Aiwei IoT Android interface documentation
1.initialization
1.1 Set SDK logs
- Description
Set the log output of the bottom layer of the SDK, and call it once before using the SDK.
public void initIvySDKLog(String logFilePath, int level)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
logFilePath | Yes | string | Absolute path, including filename |
level | Yes | int | Log level, see LogLevel |
- Quote
package com.ivyio.sdk;
public class LogLevel {
public static final int NO = 0;//close
public static final int ERR = 1;//error level
public static final int DBG = 2;//debug level
public static final int ALL = 3;//open all
}
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
//It is recommended that the file be named in the format of "prefix+yyyyMMdd.log", which can be used for log output for a certain day
SDKManager.getInstance().initIvySDKLog(filePath, LogLevel.ALL);//Called before the init method
- Note
Requires phone storage permission
1.2 Set app layer logging
- Description
Set the log output of the application layer of the app, which is called when the app is started.
public void initIvyAppLog(String logFilePath, boolean isEnableLog)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
logFilePath | Yes | string | Absolute path, including filename |
isEnableLog | Yes | boolean | Whether to output the log, the default is true |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
//It is recommended that the file be named in the format of "prefix+yyyyMMdd.log", which can be used for log output for a certain day
SDKManager.getInstance().initIvyAppLog(filePath, true);
- Note
Requires phone storage permission
1.3 SDK initialization
- Description
To initialize the SDK, it must be called once before using the SDK.
public void init(Context context)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
context | Yes | Context | context, Android environment |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().init(this);
1.4 SDK version number
- Description
Get the SDK version number.
public String getSdkVersion()
- Returns
String type, version number
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
String sdkVersion = SDKManager.getInstance().getSdkVersion();
1.5 Set Account Region
- Description
According to the regional settings of the account logged in to the cloud platform, cn and com are currently distinguished.
public void setAccountZone(EIvyAccountZone accountZone)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
accountZone | Yes | EIvyAccountZone | Account Region |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().setAccountZone(EIvyAccountZone.CN);
2.Add Device
2.1 LAN search
- Description
Search for devices in the local area network
public DiscoveryDev[] discoveryDeviceInWLAN()
- Returns
Returns an array, the searched device information
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Quote
package com.ivyiot.ipclibrary.model;
/**
* device information by Wlan
*/
public class DiscoveryDev {
public int version;//version
public int type;//device type
public String ip;//ip
public String mask;//mask
public String dns;//ddns
public int port; //port
public String mac;//mac address
public String uid;//uid
public String name;//device name
public int state;//status
}
- Example
// scan Wlan
DiscoveryDev[] nodes = SDKManager.getInstance().discoveryDeviceInWLAN();
2.2 Add QR Code
2.2.1 Add QR Code
- Description
Create QR code information for device distribution network
public String createQRInfo(String ssid, String wifiPwd)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
- Returns
Return String, QR code content information
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
// scan Wlan
SDKManager.getInstance().createQRInfo(wifi_ssid, wifi_password);
2.2.2 Add QR Code(token)
- Description
Create the QR code information (token) for device distribution network
public String createQRInfo(String ssid, String wifiPwd,String token)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
token | Yes | String | token |
- Returns
Return String, QR code content information
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().createIvyQRInfo(uid, wifi_ssid, wifi_password, token);
2.2.3 Add QR Code(token+No distinction between domestic and foreign)
- Description
Create QR code information for device distribution network
public void createIvyQRInfo(String uid, String wifi_ssid, String wifi_pwd,String token)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
uid | No | String | Device UID |
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
token | Yes | String | cloud platform token |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().createIvyQRInfo(uid, wifi_ssid, wifi_password, token);
2.3 Sound Wave Added
2.3.1 Add With UID
- Description
Start Sound Wave Add Method 1
public void startSoundWaveAdd(String uid, String wifi_ssid, String wifi_pwd, String token)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
uid | No | String | Device UID |
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
token | No | String | cloud platform token |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().startSoundWaveAdd(uid, wifi_ssid, wifi_password, token);
2.3.2 Add Without UID
- Description
Start sound wave add method 2
public void startSoundWaveAdd(String wifi_ssid, String wifi_pwd,String token, int addType)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
token | No | String | cloud platform token |
addType | Yes | int | 0: default IVY device 1: new sound wave data format |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().startSoundWaveAdd(wifi_ssid, wifi_password, token, addType);
2.3.3 Sound wave addition with token and without distinction between domestic and foreign
- 描述
Start sound wave add method 3
public void startIvySoundWaveAdd(String uid, String wifi_ssid, String wifi_pwd, String token, int deviceType)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
uid | No | String | Device UID |
ssid | Yes | String | wifi name |
wifiPwd | Yes | String | wifi password |
token | No | String | cloud platform token |
addType | Yes | int | 0: default IVY device 1: new sound wave data format |
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().startIvySoundWaveAdd(uid, wifi_ssid, wifi_password, token, deviceType);
3.Device connection
3.1 Login device
- Description
Login device
public void loginDevice(ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);
void onError(int errorCode);//Result
void onLoginError(int errorCode);
}
package com.ivyio.sdk;
public class Result {
public static final int OK = 0;//success
public static final int FAIL = 1;//fail
public static final int HANDLE_ERR = 2;//handle error
public static final int USR_OR_PWD_ERR = 3;//username and password error
public static final int ARGS_ERR = 4;//param error
public static final int APITIME_ERR = 5;//api runtime error
public static final int DENY = 6;// access deny
public static final int LOCKED = 7;//locked
public static final int MAX_USER = 8;//max users
public static final int TALK_OPENED_BY_OTHERS = 9;//talk by others
public static final int CANCEL_BY_USER = 10;//cancel by user
public static final int TIMEOUT = 11;//time out
public static final int UNSUPPORT = 12;//not support
public static final int UNKNOWN = 13;//unknown
public static final int OFFLINE = 14;//device offile
public static final int OK_ON_RESET_STATE = 15;//reset state
public static final int NO_PERMISSION = 16;//no permission
public Result() {
}
}
- Example
camera.loginDevice(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
//login success
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
//login fail,See the Result.class for error codes
}
});
3.2 Get connection handle
- Description
Get the connection handle of the device, generally used to keep the connection of the device
public int getHandle()
- Returns
The current SDK connection handle integer data, starting from 1, the value will increase
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Example
IvyCamera.getHandle();
3.3 Device connection status
- Description
Check the connection status of the device
public int checkHandle()
- Returns
Device status
Value | Description |
---|---|
0 | Initialization state |
1 | Connecting |
2 | Equipment Online |
3 | Device Offline |
4 | Maximum number of users reached |
5 | The device is locked |
6 | Incorrect username or password |
7 | Access Denied |
8 | Unknown |
9 | Illegal handle |
10 | User cancels operation |
11 | Factory state |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyio.sdk;
public class HandleState {
public static final int HANDLE_STATE_INIT = 0;//init
public static final int HANDLE_STATE_CONNECTTING = 1;//connectting
public static final int HANDLE_STATE_ONLINE = 2;//online
public static final int HANDLE_STATE_OFFLINE = 3;//offLine
public static final int HANDLE_STATE_MAX_USERS = 4;//max user
public static final int HANDLE_STATE_LOCK = 5;//lock
public static final int HANDLE_STATE_USR_OR_PWD_ERR = 6;//username or password error
public static final int HANDLE_STATE_DENY = 7;//deny
public static final int HANDLE_STATE_UNKNOWN = 8;//unknown
public static final int HANDLE_STATE_INVALID_HANDLE = 9;//invalid handle
public static final int HANDLE_STATE_CANCEL_BY_USR = 10;//cancel by user
public static final int HANDLE_STATE_ON_RESET = 11;//reset
public HandleState() {
}
- Example
IvyCamera.checkHandle();
3.4 Release the connection
- Description
Release the connection, the handle is destroyed
public void destroy()
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Example
IvyCamera.destroy();
- After calling this interface, all the memory occupied by the corresponding SDK instance will be released;
- Please do not destroy the same handle in different threads. The SDK cannot handle this operation, which will cause crash;
- Because the SDK allows multiple destruction operations to be carried out at the same time, it cannot guarantee the destruction of the same handle; if the SDK ensures that the same handle is destroyed in different threads, then when multiple handles are destroyed at the same time, the running speed will be reduced. It’s slow because the SDK has to use synchronization to ensure that the handles are destroyed one by one.
3.5 Modify device username and password
- Description
Modify the user name and password of the device
public void modifyUsrNameAndPwd(final String newUsrName, final String newPwd, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
newUsrName | Yes | String | New Username |
newPwd | Yes | String | New Password |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
It is recommended to be called when the device is in a reset state
IvyCamera.modifyUsrNameAndPwd("fos", "abc123", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
3.6 Device event listener
3.6.1 Bind event listener
- Description
Bind event listener(add observer)
public synchronized void addObserver(Observer o)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
o | Yes | Observer | Observer object that implements Observable |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
public void update(Observable o, Object arg) {
if (arg != null) {
Message msg = (Message) arg;
//msg.what corresponds to the value in EventID, msg.obj corresponds to the message content
Log.e(TAG, "update: " + msg.what + ";data=" + msg.obj);
}
}
public class EventID {
/** Base station online status change message id, defined by APP. */
public static final int BASESTATION_HANLE_STATE_CHG = 54225;
//Disconnect
public static final int NET_STATE_DISCONNECT = 88;
public static final int IVY_CTRL_MSG_ONLINE_UPGRADE_STATE = 42019;
public static final int IVY_CTRL_MSG_IPCLIST_CHG = 42020;
// mirror flip
public static final int IVY_CTRL_MSG_MIRROR_FLIP_CHG = 42021; // for foscam device
// Infrared state change message
public static final int IVY_CTRL_MSG_DAY_NIGHT_MODE_CHG = 42022; // (IRCUT? For foscam device)
// Preset
public static final int IVY_CTRL_MSG_PRESET_CHG = 42023; // for foscam device
// cruise path
public static final int IVY_CTRL_MSG_CRUISE_CHG = 42024; // for foscam device
public static final int IVY_CTRL_MSG_PRESET_REACHED = 42025; // for foscam device
public static final int IVY_CTRL_MSG_CURRENT_CRUISE_MAP_STATE_CHG = 42026; // for foscam device
// PT reaches the edge
public static final int IVY_CTRL_MSG_EDGE_ARRIVED = 42027; // for foscam device
public static final int IVY_CTRL_MSG_START_PLAY_RESULT = 42028; // only for foscam device
public static final int IVY_CTRL_MSG_GET_PRODUCT_ALL_INFO = 42029; // only for foscam device
public static final int IVY_CTRL_MSG_CHANNEL_STATE_CHG = 42030; // for foscam nvr and bpi
public static final int IVY_CTRL_MSG_ARRIVE_MAX_DURATION = 42031; // only for foscam bpi
public static final int IVY_CTRL_MSG_EXT_STATE_CHG = 42032; // only for foscam bpi
//Main stream ipc stream information
public static final int IVY_CTRL_MSG_STREAM_PARAM_CHG = 42033; // only for foscam ipc
//Sub stream ipc stream information
public static final int IVY_CTRL_MSG_SUB_STREAM_PARAM_CHG = 42034; // only for foscam ipc
public static final int IVY_CTRL_MSG_STREAM_TYPE_CHG = 42035; // only for foscam ipc
public static final int IVY_CTRL_MSG_SUB_STREAM_TYPE_CHG = 42036; // only for foscam ipc
public static final int IVY_CTRL_MSG_ABILITY_CHG = 42037; // Foscam NVR BPI use, maybe IVY Nvr use
public static final int IVY_CTRL_MSG_VOLUME_CHG = 42038; // Foscam IPC use
// Local recording: Insufficient local storage space
public static final int IVY_CTRL_MSG_RECORD_ERROR_NO_ENOUGE_SPACE = 2052; // Foscam IPC use
// Local recording: The size of the recording file reaches the maximum value
public static final int IVY_CTRL_MSG_RECORD_ERROR_MAX_FILE = 2053; // Foscam IPC use
// Local recording: resolution switching
public static final int IVY_CTRL_MSG_RECORD_ERROR_SOLUTION_CHG = 2054; // Foscam IPC use
// Local recording: the recording file does not exist
public static final int IVY_CTRL_MSG_RECORD_ERROR_FILE_PATH_NOEXIST = 2055; // Foscam IPC use
// local recording: other errors
public static final int IVY_CTRL_MSG_RECORD_ERROR_UNKNOW = 2056; // Foscam IPC use
public static final int IVY_CTRL_MSG_MUSIC_STATE_CHG = 42044;// Foscam IPC use
public static final int IVY_CTRL_MSG_BIND_DEVICE_STATE_CHG = 42045; // Foscam BPI use, mybe IVY BPI use
/**Video file*/
public static final int IVY_CTRL_MSG_VIDEO_STREAM_MODE = 42046;
public static final int IVY_CTRL_MSG_RECORD_DOWNLOAD_PROGRESS = 2063; // download progress event (id=)
}
- Example
IvyCamera.addObserver(Object);
3.6.1 Unbind event listener
- Description
Unbind event listeners (remove observers)
public synchronized void deleteObserver(Observer o)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
o | Yes | Observer | Observer object that implements Observable |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
public class EventID {
/** Base station online status change message id, defined by APP. */
public static final int BASESTATION_HANLE_STATE_CHG = 54225;
//Disconnect
public static final int NET_STATE_DISCONNECT = 88;
public static final int IVY_CTRL_MSG_ONLINE_UPGRADE_STATE = 42019;
public static final int IVY_CTRL_MSG_IPCLIST_CHG = 42020;
// mirror flip
public static final int IVY_CTRL_MSG_MIRROR_FLIP_CHG = 42021; // for foscam device
// Infrared state change message
public static final int IVY_CTRL_MSG_DAY_NIGHT_MODE_CHG = 42022; // (IRCUT? For foscam device)
// Preset
public static final int IVY_CTRL_MSG_PRESET_CHG = 42023; // for foscam device
// cruise path
public static final int IVY_CTRL_MSG_CRUISE_CHG = 42024; // for foscam device
public static final int IVY_CTRL_MSG_PRESET_REACHED = 42025; // for foscam device
public static final int IVY_CTRL_MSG_CURRENT_CRUISE_MAP_STATE_CHG = 42026; // for foscam device
// PT reaches the edge
public static final int IVY_CTRL_MSG_EDGE_ARRIVED = 42027; // for foscam device
public static final int IVY_CTRL_MSG_START_PLAY_RESULT = 42028; // only for foscam device
public static final int IVY_CTRL_MSG_GET_PRODUCT_ALL_INFO = 42029; // only for foscam device
public static final int IVY_CTRL_MSG_CHANNEL_STATE_CHG = 42030; // for foscam nvr and bpi
public static final int IVY_CTRL_MSG_ARRIVE_MAX_DURATION = 42031; // only for foscam bpi
public static final int IVY_CTRL_MSG_EXT_STATE_CHG = 42032; // only for foscam bpi
//Main stream ipc stream information
public static final int IVY_CTRL_MSG_STREAM_PARAM_CHG = 42033; // only for foscam ipc
//Sub stream ipc stream information
public static final int IVY_CTRL_MSG_SUB_STREAM_PARAM_CHG = 42034; // only for foscam ipc
public static final int IVY_CTRL_MSG_STREAM_TYPE_CHG = 42035; // only for foscam ipc
public static final int IVY_CTRL_MSG_SUB_STREAM_TYPE_CHG = 42036; // only for foscam ipc
public static final int IVY_CTRL_MSG_ABILITY_CHG = 42037; // Foscam NVR BPI use, maybe IVY Nvr use
public static final int IVY_CTRL_MSG_VOLUME_CHG = 42038; // Foscam IPC use
// Local recording: Insufficient local storage space
public static final int IVY_CTRL_MSG_RECORD_ERROR_NO_ENOUGE_SPACE = 2052; // Foscam IPC use
// Local recording: The size of the recording file reaches the maximum value
public static final int IVY_CTRL_MSG_RECORD_ERROR_MAX_FILE = 2053; // Foscam IPC use
// Local recording: resolution switching
public static final int IVY_CTRL_MSG_RECORD_ERROR_SOLUTION_CHG = 2054; // Foscam IPC use
// Local recording: the recording file does not exist
public static final int IVY_CTRL_MSG_RECORD_ERROR_FILE_PATH_NOEXIST = 2055; // Foscam IPC use
// local recording: other errors
public static final int IVY_CTRL_MSG_RECORD_ERROR_UNKNOW = 2056; // Foscam IPC use
public static final int IVY_CTRL_MSG_MUSIC_STATE_CHG = 42044;// Foscam IPC use
public static final int IVY_CTRL_MSG_BIND_DEVICE_STATE_CHG = 42045; // Foscam BPI use, mybe IVY BPI use
/**Video file*/
public static final int IVY_CTRL_MSG_VIDEO_STREAM_MODE = 42046;
public static final int IVY_CTRL_MSG_RECORD_DOWNLOAD_PROGRESS = 2063; // download progress event (id=)
}
- Example
camera.deleteObserver(Object);
3.7 Obtain factory password based on device uid
-Description
Obtain factory password based on device uid
public String getFactoryPassword(String uid)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
uid | Yes | String | uid of the device |
- Returns
Device factory password
- Class
com.ivyiot.ipclibrary.sdk.SDKManager
- Example
SDKManager.getInstance().getFactoryPassword();
4. Equipment basic information
4.1 Get device information
-Description
Get device information
public void getDevInfo(final ISdkCallback<DevInfo> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Equipment basic information
*/
public class DevInfo {
/** Device Type {@link com.ivyio.sdk.DevType} */
public int devType;
/** platform type */
public int platType;
/** sensor type */
public int sensorType;
/** wifi type */
public int wifiType;
/** language */
public int language;
/** product name */
public String productName;
/** Equipment name */
public String devName;
/** Application firmware version number */
public String firmwareVersion;
/** System firmware version number */
public String hardwareVersion;
/** serial number */
public String serialNo;
/** Device UID */
public String uid;
/** NAC address */
public String mac;
/** OEM code */
public int oemCode;
}
- Example
IvyCamera.getDevInfo(new ISdkCallback<DevInfo>() {
@Override
public void onSuccess(DevInfo result) {
Log.e(TAG, "getDevInfo onSuccess. uid= " + result.uid + " ,mac= " + result.mac);
}
@Override
public void onError(int errorCode) {
Log.e(TAG, "getDevInfo onError:" + errorCode);
}
@Override
public void onLoginError(int errorCode) {
Log.e(TAG, "getDevInfo onLoginError:" + errorCode);
}
});
4.2 Get Device Capability Set
- Description
Get the device capability set, including all the flag bits of the device
public void getDevAbility(final ISdkCallback<DevAbility> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Device capability set
*/
public class DevAbility {
/** Model number */
public int model;
/** Whether machine support sd card */
public boolean sdFlag;
/** Whether machine is outdoor */
public boolean outdoorFlag;
/**
*Whether machine support pt
*/
public boolean isEnablePTZ;
/** Whether machine support zoom */
public boolean zoomFlag;
/**Whether machine support rs485 */
public boolean rs485Flag;
/** Whether machine support io alarm */
public boolean ioAlarmFlag;
/** Whether machine support onvif */
public boolean onvifFlag;
/** Whether machine support p2p */
public boolean p2pFlag;
/** Whether machine support wps */
public boolean wpsFlag;
/** Whether machine support audio-speak */
public boolean audioFlag;
/** Whether machine support audio-talk */
public boolean talkFlag;
/** Whether to support full duplex */
public boolean bDuplexVoice;
/** for foscam device */
public boolean bNetworkAdapter;
/** true: only support switching stream, false: switching resolution */
public boolean bStreamMode;
/** true: region selection is supported: false: region selection is not supported */
public boolean bMotionArea;
/** Whether to support one key call */
public boolean bOneKeyCall;
/** Whether to support the night vision plan, whether to support only AUTO IR (if only AUTO IR is supported, manual settings and plan settings are not supported)*/
public boolean bNightVisionSchedule;
/** Camera application version */
public String appVer;
/** 0 or 1 */
public boolean isEnableAudioDetect;
public boolean isEnableTemperatureDetect;
public boolean isEnableHumidityDetect;
public boolean isEnablePIRDetect;
public boolean isEnableLedOnOff;
public boolean isEnableNightLight;
/***ipc tip voice val4 : 9*/
public boolean isEnableIpcTipVoice;
public boolean isEnableChangeVoice;
public boolean isEnableWdr;
/**Whether SD card format is supported val6 : 2*/
public boolean isEnableSDCardFormat;
/**Whether small languages are supported*/
public boolean isEnableMinorLanguage;
// Bit[4]: Whether to support refocus, 1 supports, 0 does not support val6:4;
public boolean isRefocus;
//Whether to support SD card recording timeline function val12:5
public boolean isEnableSDCardTimeLine;
//Whether it supports adjusting the intercom volume
public boolean isEnableSpeakVolume;
//ability capability set
public long abilityArray[] = new long[3];
//OSD display device name
public boolean isEnableSHowDeviceName;
//OSD display device time
public boolean isEnableShowDeviceTime;
//Whether image mirroring is supported
public boolean isEnableMirror;
//Whether image flipping is supported
public boolean isEnableFlip;
//Whether to support Omron face detection algorithm
public boolean isEnableOMLFaceAlgorithm;
//Whether to support the Shenma full-duplex algorithm
public boolean isEnableSMFullDuplex;
//Whether ringbell is supported
public boolean isEnableRingBell;
//Whether isSupportlV1PIR is supported
public boolean isEnablelV1PIR;
//Whether isSupportlV3PIR is supported
public boolean isEnablelV3PIR;
//Whether to support isSupportWhiteLight
public boolean isEnableWhiteLight;
/** Whether to support dropbox cloud storage, false means support Baidu cloud storage (fosbaby domestic and foreign sales series only support Baidu cloud storage) */
public boolean isEnableDropboxStorage;
/** Whether to support Baidu push */
public boolean enableBaiduPush;
/** Whether to support Foscam push */
public boolean enableFoscamPush;
/** Whether to support Foscam storage */
public boolean enableFoscamStorage;
/** Whether to support Foscam rich media push */
public boolean enableFoscamRichPush;
/** Whether to support Alexa */
public boolean enableAlexa;
/** Whether to support 7*24 hours cloud storage */
public boolean enable24HStorage;
/** Whether to support alarm recording duration setting */
public boolean enableRecordTimeSet;
/** Whether to support APP preset cruise */
public boolean enablePresetCruise;
/** Whether to support SmartHome */
public boolean enableSmartHome;
//============== val 2 (reserve2) =============
/** Whether to support out-of-frame detection */
public boolean enableOutSideDetect;
/** Whether to support IV detection */
public boolean enableIVDetect;
/** Whether to support human detection -- Aihua Yingtong */
public boolean enableHumanDetect_aiwinn;
/** Whether to support human detection -- Shankou */
public boolean enableHumanDetect_sanko;
/** Omron humanoid algorithm val2 10 */
public boolean enableOMLPedestrianDetect;
//============== val 3 (reserve3) =============
/** Whether to support nursery rhymes 0*/
public boolean enableBabyMusic;
/** Whether to support chip encryption */
// public boolean enableChipEncrypt;
/** Whether SoftAP is supported */
// public boolean enableSoftAP;
/** Whether to support EZLink (does not distinguish between chips, does not indicate whether IPC scan code is supported) */
// public boolean enableEZLink;
/** Whether to support PPPoE */
// public boolean enablePPPoE;
/** Whether to support night vision infrared function */
public boolean isEnableNightIRCut;
/**val3 : 7 dual light source functions*/
public boolean isEnableDualLampSource;
/**HDR val4 : 7*/
public boolean isEnableHDR;
/**Scheduled restart val4: 2*/
public boolean isEnableTimingReboot;
/**Whether to support H264/H265 switching val9: 2*/
public boolean isEnableSwitchH264H265;
/**Whether sleep is supported val9: 3*/
public boolean isEnableSleepMode;
/**Whether support SIREN linkage (Foscam) val10: 4*/
public boolean isEnableSiren;
/**Whether to support humanoid tracking (Foscam) val10: 6*/
public boolean isEnableHumanoidTracking;
/**Privacy area masking val11: 0*/
public boolean isEnablePrivacyMask;
/**Whether to support occlusion lens alarm val11 : 1*/
public boolean isEnableCameraLensOcclusion;
/**Alarm gear. 0 means support 5 gears or default, 1 means support 3 gears val11:2*/
public boolean isEnableAlertSensitivity_3;
/** The number of detection areas. 0 means the default detection number of other models is supported, and 1 means the number of 2 detection areas is supported. val11:3*/
public boolean isEnableAlarmArea_2;
/**Whether to support custom alarm sound val11:4*/
public boolean isEnableCustomAlarmTone;
/**Whether to support device alarm recording duration setting val12:1*/
public boolean isEnableAlarmRecordingDuration;
/**Whether it supports white light brightness adjustment val12:4*/
public boolean isEnableWhiteLightSetting;
// Whether to support auto focus function val6: 0
public boolean isEnableAutoFocus;
/**Whether to support downloading pictures val12:4*/
public boolean isEnableNewPictureType;
}
- Example
IvyCamera.getDevAbility(new ISdkCallback<DevInfo>() {
@Override
public void onSuccess(DevInfo result) {
Log.e(TAG, "getDevAbility onSuccess.);
}
@Override
public void onError(int errorCode) {
Log.e(TAG, "getDevAbility onError:" + errorCode);
}
@Override
public void onLoginError(int errorCode) {
Log.e(TAG, "getDevAbility onLoginError:" + errorCode);
}
});
5. Real-time playback related
5.1 Live playback
5.1.1 Turn on live playback
- Description
Turn on live playback
public void openVideo(final IvyCamera camera, final IVideoListener videoListener)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
camera | Yes | IvyCamera | Device Object |
videoListener | Yes | IVideoListener | Video playback callback |
-Class
com.ivyiot.ipclibrary.video.VideoSurfaceView
- Quote
com.ivyiot.ipclibrary.model.IvyCamera
package com.ivyiot.ipclibrary.video;
/**
* Video playback monitoring
*/
public interface IVideoListener {
/** Picture capture */
void snapFinished(byte[] rgb);
/** Get the first frame */
void firstFrameDone(Bitmap rgb);
void openVideoSucc();
void openVideoFail(int errorCode);
void closeVideoSucc();
void closeVideoFail(int errorCode);
/**Network traffic speed*/
void netFlowSpeedRefresh(String speedValue);
}
- Example
VideoSurfaceView.openVideo(IvyCamera, IVideoListener);
5.1.2 Turn off real-time playback
-Description
Turn off live playback
public void closeVideo()
-Class
com.ivyiot.ipclibrary.video.VideoSurfaceView
- Example
VideoSurfaceView.closeVideo();
It must correspond to the
VideoSurfaceView.openVideo(IvyCamera)
method, one Open corresponds to one Close and the order cannot be wrong, otherwise it will not play normally.
5.1.3 Capture
- Play snapshots in real time and save them as pictures locally
public void snap(boolean hasSound, String imgPath, ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
hasSound | Yes | boolean | Do you need to capture sound |
imgPath | Yes | String | The absolute path of the image, the general file suffix is .jpg |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.video.VideoSurfaceView
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
It needs to be able to play normally to capture successfully, and the read and write permissions of the file are required before capture
IvyCamera.snap(hasSound, imgPath, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.2 Sharpness switch
5.2.1 Get the stream type
- Description
Get the stream type
public int getStreamType()
- Returns
Main stream(0) or substream(1), see reference to StreamMode
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.model;
public class StreamMode {
/** main stram*/
public static final int STREAM_MAIN = 0;
/** sub stram*/
public static final int STREAM_SUB = 1;
}
5.2.2 Set the stream type
- Description
Set main stream(0) or substream(1)
public void setStreamType(int streamType)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
streamType | Yes | int | Main stream 0, substream 1, see reference to StreamMode |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.model;
public class StreamMode {
/** main stram*/
public static final int STREAM_MAIN = 0;
/** sub stram*/
public static final int STREAM_SUB = 1;
}
- Example
IvyCamera.setStreamType(StreamMode.STREAM_MAIN);
5.2.3 Get resolution configuration
- Description
Get current resolution configuration based on device info and capability set
public EDefinitionItem getDefinitionItems(DevAbility devAbility, int sensorType)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
devAbility | Yes | DevAbility |
Device Capability Set |
sensorType | Yes | int | Device sensor type, contained in DevInfo |
- Returns
Clarity Collection
Value | Description |
---|---|
NORMAL | Applicable to most models |
MSTAR_400W | Mstar 400W model |
MSTAR_313E | Mstar 313E model |
LOWEST | Models for switching between primary and secondary streams |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.model;
/**
* Definition configuration
*/
public enum EDefinitionItem {
/**
* public
*/
NORMAL(new EResolutionMode[]{EResolutionMode.FHD, EResolutionMode.HD, EResolutionMode.SD}),
/**
* Mstar 400W
*/
MSTAR_400W(new EResolutionMode[]{EResolutionMode.QHD, EResolutionMode.FHD, EResolutionMode.HD}),
/**
* Mstar 313E
*/
MSTAR_313E(new EResolutionMode[]{EResolutionMode.FHD, EResolutionMode.HD}),
/**
* Main and sub stream switching, NVR, etc.
*/
LOWEST(new EResolutionMode[]{EResolutionMode.FHD, EResolutionMode.SD});
/**
* current
*/
private EResolutionMode[] _currRules;
/**
* Constructor
*/
EDefinitionItem(EResolutionMode[] rules) {
this._currRules = rules;
}
public int getLength(){
return _currRules.length;
}
public EResolutionMode[] getCurrRules(){
return _currRules;
}
/**
* Resolution options
*/
public enum EResolutionMode {
QHD,
FHD,
HD,
SD
}
}
- Example
IvyCamera.getDefinitionItems(devAbility, devInfo);
5.2.4 Set sharpness
- Description
Set sharpness, for a toggle with three sharpness levels
public void changeDefinition(final int definition, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
definition | Yes | int | Definition array EDefinitionItem subscript |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
You must pass in the acquired clarity array subscript
IvyCamera.changeDefinition(index, ISdkCallback);
5.2.5 Substream switching
- Description
Sub-stream switching, corresponding to models that only support main and sub-stream switching, generally corresponding to switching between two resolution levels
public void changeStream(final int index )
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
index | Yes | int | Index of definition array EDefinitionItem |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
5.3 Monitoring
5.3.1 Turn on monitoring
- Description
Turn on audio
public void openAudio(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
After calling this interface, the sound channel is opened, and it is necessary to manually obtain the sound data and play it out. See
com.ivyiot.ipclibrary.audio.AudioThread
for details
IvyCamera.openAudio(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
if (null == audioThread) {
/**
* @param camera IvyCamera object
* @param isEnableSMFullDuplex Whether to support SM echo cancellation, the field value is obtained from the capability set
*/
audioThread = new AudioThread(IvyCamera, isEnableSMFullDuplex);
audioThread.startAudio();
audioThread.start();
}
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.3.2 Turn off monitoring
- Description
turn off audio
public void closeAudio(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
After turning off monitoring, you need to manually stop audio playback. See com.ivyiot.ipclibrary.audio.AudioThread for details
IvyCamera.closeAudio(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
if (null != audioThread) {
audioThread.stopAudio();
audioThread = null;
}
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.4 Intercom
5.4.1 Open Intercom
- Description
Turn on the intercom, android 6.0 or above requires runtime access to the microphone permission
public void openTalk(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
After calling the interface, you need to manually collect the data collected by the mobile phone microphone and send it to the device. For details, see com.ivyiot.ipclibrary.audio.TalkThread
IvyCamera.openTalk(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
if (null == talkThread) {
/**
* @param camera IvyCamera object
* @param isEnableSMFullDuplex Whether to support SM echo cancellation, the field value is obtained from the capability set
*/
talkThread = new TalkThread(camera, false);
talkThread.startTalk();
talkThread.start();
}
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.4.2 Turn off intercom
- Description
Turn off the intercom
public void closeTalk(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
After closing the intercom, you need to manually stop sending data, see com.ivyiot.ipclibrary.audio.TalkThread for details
IvyCamera.closeTalk(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
if (null != talkThread) {
talkThread.stopTalk();
talkThread = null;
}
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.5 Local recording
5.5.1 Start recording
- Description
Start recording. It is valid only after the video stream data is successfully obtained.
public void startRecord(String filePath, ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
filePath | Yes | String | The full path of the video file storage (including the file name, the suffix is .mp4 ) |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.startRecord(filePath, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.5.2 Stop recording
- Description
stop recording
public void stopRecord(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.stopRecord(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.6 Mirror flip
5.6.1 Get mirror rollover configuration
- Description
Get the mirror rollover settings for the device
public void getMirrorAndFlip(final ISdkCallback<Integer[]> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
Integer array is returned in the callback, which contains two elements, the first is the switch state of mirror, and the second is the switch state of flip. 1 means on, 0 means off.
IvyCamera.getMirrorAndFlip(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.6.2 Set video flip
- Description
Set the video flip switch
public void setFlip(final int enable, final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
enable | Yes | int | Switch status 1 on, 0 off |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setFlip(enable, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.6.3 Setting up video mirroring
- Description
Set the video mirroring switch
public void setMirror(final int enable, final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
enable | Yes | int | Switch status 1 on, 0 off |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setMirror(enable, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.7 IR Mode
5.7.1 Get IR Mode
- Description
Get IR mode and switch
public void getInfraredLed(final ISdkCallback<Integer[]> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
An Integer array is returned in the callback, containing two elements, the first is mode and the second is onoff;
mode: 0 Auto mode , 1 Manual mode; onoff: 1 open , 0 close
IvyCamera.getInfraredLed(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.7.2 Set infrared mode
- Description
Set infrared mode and switch
public void setInfraredLed(final int mode, final int onOff, final ISdkCallback<Integer[]> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
mode | Yes | int | Infrared mode (0: Auto 1: Manual 2: Schedule). |
onOff | Yes | int | Infrared open state (1:open 0:close), only valid in manual mode (mode=1) |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
private enum EInfraLedMode {
/**
* automatic
*/
AUTO,
/**
* Manual
*/
MANUEL,
/**
* Timing
*/
SCHEDULE
}
- Example
IvyCamera.setInfraredLed(EInfraLedMode, onOff, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8 PTZ related
5.8.1 PTZ Control
- Description
Control the 8 directions of the ipc gimbal to rotate, and stop, zoomIn, zoomOut, focusFar, focusNear through this interface
public void ptzControl(final int ptzCmd, final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
ptzCmd | Yes | int | The command ID of the gimbal, see reference to PTZCmd |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* PTZ control command
*/
public class PTZCmd {
public static final int PTZ_STOP = 0;
public static final int PTZ_RESET = 1;
public static final int PTZ_MOVE_UP = 2;
public static final int PTZ_MOVE_DOWN = 3;
public static final int PTZ_MOVE_LEFT = 4;
public static final int PTZ_MOVE_RIGHT = 5;
public static final int PTZ_MOVE_LEFTUP = 6;
public static final int PTZ_MOVE_LEFTDOWN = 7;
public static final int PTZ_MOVE_RIGHTUP = 8;
public static final int PTZ_MOVE_RIGHTDOWN = 9;
public static final int PTZ_SET_SPEED = 10;
public static final int PTZ_ZOOM_IN = 11;
public static final int PTZ_ZOOM_OUT = 12;
public static final int PTZ_ZOOM_STOP = 13;
public static final int PTZ_SET_ZOOM_SPEED = 14;
public static final int PTZ_GET_ZOOM_SPEED = 15;
public static final int PTZ_FOCUS_NEAR = 16;
public static final int PTZ_FOCUS_FAR = 17;
public static final int PTZ_FOCUS_STOP = 18;
public static final int PTZ_GOTO_SLEEP = 19;
public static final int PTZ_GOTO_WAKEUP = 20;
public static final int PTZ_SET_PRESET_POINT = 21;
public static final int PTZ_GOTO_PRESET_POINT = 22;
public static final int PTZ_CLEAR_PRESET_POINT = 23;
public static final int PTZ_GET_PRESET_POINT_LIST = 24;
public static final int PTZ_SET_GUARD_POSITION = 25;
public static final int PTZ_GET_GUARD_POSITION = 26;
public static final int PTZ_START_CRUISE = 27;
public static final int PTZ_STOP_CRUISE = 28;
public static final int PTZ_SET_CURISE_MAP = 29;
public static final int PTZ_CLEAR_CURISE = 30;
public static final int PTZ_GET_CRUISE_MAP_INFO = 31;
public static final int PTZ_SET_CURISE_CTRL_TIME = 32;
public static final int PTZ_GET_CRUISE_MAP_LIST = 33;
public static final int PTZ_SET_CRUISE_CTRL_MODE = 34;
public static final int PTZ_GET_CRUISE_CTRL_MODE = 35;
public static final int PTZ_SET_CRUISE_TIME_CUSTOMED = 36;
public static final int PTZ_GET_CRUISE_TIME_CUSTOMED = 37;
public static final int PTZ_SET_CRUISE_TIME = 38;
public static final int PTZ_GET_CRUISE_TIME = 39;
public static final int PTZ_SET_SELF_TEST_MODE = 40;
public static final int PTZ_GET_SELF_TEST_MODE = 41;
public static final int PTZ_SET_PRE_POINT_FOR_SELF_TEST = 42;
public static final int PTZ_GET_PRE_POINT_FOR_SELF_TEST = 43;
}
- Example
public boolean onTouch(View v, MotionEvent event) {
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN: {// XXX MotionEvent.ACTION_DOWN
switch (v.getId()) {
case R.id.imgbtn_ptz_up://PTZ
IvyCamera.ptzControl(PTZCmd.PTZ_MOVE_UP, null);
break;
case R.id.imgbtn_ptz_down://PTZ down
IvyCamera.ptzControl(PTZCmd.PTZ_MOVE_DOWN, null);
break;
case R.id.imgbtn_ptz_left://gimbal left
IvyCamera.ptzControl(PTZCmd.PTZ_MOVE_LEFT, null);
break;
case R.id.imgbtn_ptz_right://gimbal right
IvyCamera.ptzControl(PTZCmd.PTZ_MOVE_RIGHT, null);
break;
case R.id.imgbtn_ptz_center://PTZ recovery
IvyCamera.ptzControl(PTZCmd.PTZ_RESET, null);
break;
case R.id.imgbtn_ptz_zoomadd://zoom+
IvyCamera.ptzControl(PTZCmd.PTZ_ZOOM_IN, null);
break;
case R.id.imgbtn_ptz_zoomreduce://zoom-
IvyCamera.ptzControl(PTZCmd.PTZ_ZOOM_OUT, null);
break;
case R.id.imgbtn_ptz_focusadd://focus+
IvyCamera.ptzControl(PTZCmd.PTZ_FOCUS_FAR, null);
break;
case R.id.imgbtn_ptz_focusreduce://focus-
IvyCamera.ptzControl(PTZCmd.PTZ_FOCUS_NEAR, null);
break;
}
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: {
switch (v.getId()) {
case R.id.imgbtn_ptz_up://stop on gimbal
case R.id.imgbtn_ptz_down://stop under gimbal
case R.id.imgbtn_ptz_left://gimbal left stop
case R.id.imgbtn_ptz_right://PTZ right stop
IvyCamera.ptzControl(PTZCmd.PTZ_STOP, null);
break;
case R.id.imgbtn_ptz_zoomadd://zoom+stop
case R.id.imgbtn_ptz_zoomreduce://zoom-stop
IvyCamera.ptzControl(PTZCmd.PTZ_STOP, true);
break;
case R.id.imgbtn_ptz_focusadd://focus+stop
case R.id.imgbtn_ptz_focusreduce://focus-stop
IvyCamera.ptzControl(PTZCmd.PTZ_FOCUS_STOP, true);
break;
}
}
break;
}
return false; // return false means the system will continue processing
}
5.8.2 PTZ preset position acquisition
- Description
PTZ preset position collection acquisition
public void getPTZPresetList(final ISdkCallback<ResetPointList> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class ResetPointList {
/**result*/
public int result;
/** Current preset point count */
public int pointCnt;
/** The name of point */
public String[] pointName;
}
- Example
IvyCamera.getPTZPresetList(new ISdkCallback<ResetPointList>() {
@Override
public void onSuccess(ResetPointList result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8.3 Execute PTZ preset
- Description
Execute the corresponding preset
public void goToPTZPresetPoint(final String pointName, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
pointName | Yes | String | Preset name, generally corresponds to the preset in the preset list |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.goToPTZPresetPoint("TopMost", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8.4 Add Preset
- Description
Add preset
public void addPTZPreset(final String pointName, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
pointName | Yes | String | Preset name, usually in English, and cannot be duplicated |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.addPTZPreset("test1", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8.5 Delete Preset
- Description
delete preset
public void deletePTZPreset(final String pointName, final ISdkCallback<ResetPointList> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
pointName | Yes | String | Preset name, generally corresponds to the preset in the preset list |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class ResetPointList {
/**result*/
public int result;
/** Current preset point count */
public int pointCnt;
/** The name of point */
public String[] pointName;
}
- Example
IvyCamera.deletePTZPreset("test1", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8.6 Execute cruise
- Description
Start cruise, including horizontal, vertical, fixed-point cruise
public void startPTZCruise(final String cruiseName, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
cruiseName | Yes | String | Cruise name Horizontal, Vertical, AllPresetPoint |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.startPTZCruise("Horizontal", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
5.8.7 Stop Cruise
- Description
stop cruising
public void stopPTZCruise(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.stopPTZCruise(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
6. SD card
6.1 Basic operation of SD card
6.1.1 Query SD card information
- Description
Get the sd card information in the device
public void getSDInfo(final ISdkCallback<DevSDInfo> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
/**
* sd card information in ipc
*/
public class DevSDInfo {
/** Whether there is an SD card */
public boolean isExist;
/** Remaining space, unit: Byte */
public long freeSpace;
/** Total space, unit: Byte */
public long totalSpace;
}
- Example
IvyCamera.getSDInfo(new ISdkCallback<DevSDInfo>() {
@Override
public void onSuccess(DevSDInfo result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
6.1.2 Format SD card
- Description
format sd card
public void formatSD(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* sd card information in ipc
*/
public class DevSDInfo {
/** Whether there is an SD card */
public boolean isExist;
/** Remaining space, unit: Byte */
public long freeSpace;
/** Total space, unit: Byte */
public long totalSpace;
}
- Example
IvyCamera.formatSD(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
6.2 SD card playback
6.2.1 Query SD card recording
- Description
Get a list of sd video files over a period of time.
public void getPBList(final int startTime, final int endTime, final int recordType, final ISdkCallback<ArrayList<String>> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
startTime | Yes | int | Search start time (UTC time, accurate to seconds) |
endTime | Yes | int | Search end time (UTC time, accurate to seconds) |
recordType | Yes | int | File Type: 0 schedule, 1 alert, 2 all |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
Because the maximum number of videos in a day can exceed 1000, it is recommended to query by time period, and the query period should not exceed one day.
//Note: The month of the Calendar class starts from 0.
Calendar cal = Calendar.getInstance();
//2019.9.23 00:00:00
cal.set(2022, 0, 5, 0, 0, 0);
int todayStart = (int) (cal.getTimeInMillis() / 1000);
//2019.9.23 23:59:59
cal.set(2022, 0, 5, 23, 59, 59);
int todayEnd = (int) (cal.getTimeInMillis() / 1000);
IvyCamera.getPBList(todayStart, todayEnd, 1, new ISdkCallback<ArrayList<PlaybackRecordInfo>>() {
@Override
public void onSuccess(ArrayList<PlaybackRecordInfo> result) {
Log.e(TAG, "onSuccess");
}
@Override
public void onError(int errorCode) {
Log.e(TAG, "onError: " + errorCode);
}
@Override
public void onLoginError(int errorCode) {
}
});
6.2.2 Open SD card video playback
- Description
Open playback video
public void openPBVideo(final IvyCamera camera, final PlaybackRecordInfo playbackRecordInfo, final IPBVideoListener videoListener)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
camera | Yes | IvyCamera | Device Object |
playbackRecordInfo | Yes | PlaybackRecordInfo | Recording file path |
videoListener | Yes | String | Playback callback listener event |
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Quote
package com.ivyiot.ipclibrary.video;
public interface IPBVideoListener {
void openPBVideoSucc();
void openPBVideoFail(int errorCode);
void closePBVideoSucc();
void closePBVideoFail(int errorCode);
void pausePBVideoSucc();
void pausePBVideoFail(int errorCode);
void resumePBVideoSucc();
void resumePBVideoFail(int errorCode);
void seekPBVideoSucc();
void seekPBVideoFail(int errorCode);
void onPlayLoadProgress(int progress);
void onPlayStart();
void onPlaying(int progress);
void onPlayComplete();
void onPlayFail();
}
- Example
PBVideoSurfaceView.openPBVideo(IvyCamera, PlaybackRecordInfo, IPBVideoListener);
6.2.3 Disable SD card video playback
- Description
Close playback video
public void closePBVideo()
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.closeVideo();
It must correspond to the
PBVideoSurfaceView.openPBVideo()
method, one Open corresponds to one Close and the order cannot be wrong, otherwise it will not play normally.
6.2.3 SD card video playback pause
- Description
Pause playback video
public void pausePBVideo()
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.pausePBVideo();
6.2.4 SD card video playback resume playback
- Description
Resume playback video
public void resumePBVideo()
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.resumePBVideo();
6.2.5 SD card video playback drag play
- Description
Drag the video progress bar to play
public void seekPBVideo(int seekTime)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
seekTime | Yes | int | The time point position to drag to, a value of 0-100 |
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.seekPBVideo(100);
6.2.6 Open SD card video playback audio
- Description
Turn on playback audio
public void openPBAudio()
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.openPBAudio();
6.2.7 Disable SD card video playback audio
- Description
Turn off playback audio
public void closePBAudio()
- Class
com.ivyiot.ipclibrary.video.PBVideoSurfaceView
- Example
PBVideoSurfaceView.closePBAudio();
6.3 SD card video download
6.3.1 SD card video download
- Description
Download SD card video
public void downloadSDCardRecord(final PlaybackRecordInfo playbackRecordInfo, final String dstPath, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
playbackRecordInfo | Yes | PlaybackRecordInfo | Record query list data |
dstPath | Yes | String | Absolute path to store recordings |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public interface PlaybackRecordInfo {
}
public class PlaybackRecordListInfoArgsType0 implements PlaybackRecordInfo{
public int channel;
public long sTime;
public long eTime;
public int recordType;
public PlaybackRecordListInfoArgsType0() {
}
}
public class PlaybackRecordListInfoArgsType1 implements PlaybackRecordInfo{
public String recordPath;
public PlaybackRecordListInfoArgsType1() {
}
}
- Example
IvyCamera.downloadSDCardRecord(PlaybackRecordInfo, dstPath, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
Download progress is transmitted through events, IvyCamera needs to create an observer, and then monitor the update method in the observer, it will return the event of IVY_CTRL_MSG_RECORD_DOWNLOAD_PROGRESS=2063, and get the corresponding progress loading.
6.3.2 Cancel download SD card video
- Description
Cancel download SD card video
public void cancelSDCardDownload(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.cancelSDCardDownload(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7. Device Settings
7.1 Network
7.1.1 Get device WiFi list
- Description
Get the list of Wi-Fi detected on the device side
public void getWiFiList(final ISdkCallback<ArrayList<DevWiFiDetail>> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class DevWiFiDetail {
/** Wi-Fi ssid */
public String ssid;
/** Wi-Fi mac */
public String mac;
/** Whether to encrypt */
public boolean encryption;
/** Signal quality (0-100) The larger the value, the higher the signal quality */
public int quality;
/** encryption type */
public int encryType;
}
- Example
IvyCamera.getWiFiList(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.1.2 Get device WiFi information
- Description
Get current Wi-Fi information
public void getWiFiSetting(final ISdkCallback<DevWiFiDetail> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class DevWiFiDetail {
/** Wi-Fi ssid */
public String ssid;
/** Wi-Fi mac */
public String mac;
/** Whether to encrypt */
public boolean encryption;
/** Signal quality (0-100) The larger the value, the higher the signal quality */
public int quality;
/** encryption type */
public int encryType;
}
- Example
IvyCamera.getWiFiSetting(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.1.3 Set device WiFi information
- Description
Set up Wi-Fi
public void setWiFiSetting(final DevWiFiDetail wifiDetail, final String wifiPwd, final ISdkCallback<DevWiFiDetail> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
wifiDetail | Yes | DevWiFiDetail | wifiDetails |
wifiPwd | Yes | String | wifi password |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class DevWiFiDetail {
/** Wi-Fi ssid */
public String ssid;
/** Wi-Fi mac */
public String mac;
/** Whether to encrypt */
public boolean encryption;
/** Signal quality (0-100) The larger the value, the higher the signal quality */
public int quality;
/** encryption type */
public int encryType;
}
- Example
IvyCamera.setWiFiSetting(DevWiFiDetail, wifiPassword, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.1.4 Get network adaptation status
-Description
Get network adaptation status
public void getNetworkAutoAdapt(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getNetworkAutoAdapt(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.1.5 Set network adaptive state
- Description
Set network adaptive state
public void setNetworkAutoAdapt(final boolean isEnable, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
isEnable | Yes | boolean | false to close; true to open |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getNetworkAutoAdapt(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.2 Time synchronization
7.2.1 Get device system time
- Description
Get device system time
public void getSystemTime(final ISdkCallback<DevSystemTime> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* ipc system time
*/
public class DevSystemTime {
/**
* 0-Get time from NTP server
* 1-Set time manually
*/
public int timeSource;
/**
* ntp server addr Support ntp server:
* time.nist.gov
* time.kriss.re.kr
* time.windows.com (default)
* time.nuri.net
*/
public String ntpServer = "time.windows.com";
/**
* 0 YYYY-MM-DD
* 1 DD/MM/YYYY
* 2 MM/DD/YYYY
*/
public int dateFormat;
/**
* 0 - 12 hours
* 1 - 24 hours
*/
public int timeFormat;
/**
* The seconds between local time and GMT time
*/
public int timeZone;
/**
* Daylight saving time
* 0-disable
* 1-enable
*/
public int isDst;
/** Not in use currently */
public int dst;
public int year;
public int mon;
public int day;
public int hour;
public int minute;
public int sec;
}
```
- Example
```java
IvyCamera.getSystemTime(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
```
------------
#### 7.2.2 Set device system time
- Description
Set device system time
public void setSystemTime(final DevSystemTime devSystemTime, final ISdkCallback
- Parameters
|Name|Necessary|Type|Description|
|:---- |:---|:----- |----- |
|devSystemTime |Yes |DevSystemTime |Device System Time Information |
|callback |Yes |ISdkCallback |Result callback |
- Class
`com.ivyiot.ipclibrary.model.IvyCamera`
- Quote
```java
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* ipc system time
*/
public class DevSystemTime {
/**
* 0-Get time from NTP server
* 1-Set time manually
*/
public int timeSource;
/**
* ntp server addr Support ntp server:
* time.nist.gov
* time.kriss.re.kr
* time.windows.com (default)
* time.nuri.net
*/
public String ntpServer = "time.windows.com";
/**
* 0 YYYY-MM-DD
* 1 DD/MM/YYYY
* 2 MM/DD/YYYY
*/
public int dateFormat;
/**
* 0 - 12 hours
* 1 - 24 hours
*/
public int timeFormat;
/**
* The seconds between local time and GMT time
*/
public int timeZone;
/**
* Daylight saving time
* 0-disable
* 1-enable
*/
public int isDst;
/** Not in use currently */
public int dst;
public int year;
public int mon;
public int day;
public int hour;
public int minute;
public int sec;
}
```
- Example
```java
IvyCamera.setSystemTime(DevSystemTime, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
```
------------
#### 7.2.2 Sync phone time to device
- Description
Phone time sync to device
public void syncSystemTime(final ISdkCallback
- Parameters
|Name|Necessary|Type|Description|
|:---- |:---|:----- |----- |
|callback |Yes |ISdkCallback |Result callback |
- Class
`com.ivyiot.ipclibrary.model.IvyCamera`
- Quote
````java
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* ipc system time
*/
public class DevSystemTime {
/**
* 0-Get time from NTP server
* 1-Set time manually
*/
public int timeSource;
/**
* ntp server addr Support ntp server:
* time.nist.gov
* time.kriss.re.kr
* time.windows.com (default)
* time.nuri.net
*/
public String ntpServer = "time.windows.com";
/**
* 0 YYYY-MM-DD
* 1 DD/MM/YYYY
* 2 MM/DD/YYYY
*/
public int dateFormat;
/**
* 0 - 12 hours
* 1 - 24 hours
*/
public int timeFormat;
/**
* The seconds between local time and GMT time
*/
public int timeZone;
/**
* Daylight saving time
* 0-disable
* 1-enable
*/
public int isDst;
/** Not in use currently */
public int dst;
public int year;
public int mon;
public int day;
public int hour;
public int minute;
public int sec;
}
```
- Example
```java
IvyCamera.syncSystemTime(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
```
------------
### 7.3 Device Volume
#### 7.3.1 Get device volume
- Description
Get device volume
public void getAudioVolume(final ISdkCallback callback)
- Parameters
|Name|Necessary|Type|Description|
|:---- |:---|:----- |----- |
|callback |Yes |ISdkCallback |Result callback |
- Class
`com.ivyiot.ipclibrary.model.IvyCamera`
- Quote
````java
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getAudioVolume(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.3.2 Set device volume
- Description
Set device volume
public void setAudioVolume(final int volume, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
volume | Yes | int | (0 - 100) |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setAudioVolume(100, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4 Detection related
7.4.1 Motion Detection
7.4.1.1 Get motion detection configuration
- Description
Get motion detection configuration
public void getMotionDetectConfig(final ISdkCallback<DevMotionDetect> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class DevMotionDetect {
/** Whether amba&hisi is enabled 0: off 1: on */
public int enable;
/**
* amba&hisi linkage, bitwise representation
* <p>
* Bit0 Ring
* Bit1 send mail
* Bit2 screenshot
* Bit3 recording
* Bit4 Io output
* Bit5 screenshots uploaded to the cloud
* Bit6 video upload to cloud
* Bit7 mobile push
*/
public int linkage;
/** amba&hisi trigger interval (seconds) */
public int snapInterval;
/** amba&hisi trigger interval (seconds) */
public int triggerInterval;
/** amba&hisi motion detection alarm switch 0: off 1: on */
public int moveAlarmEnable;
/** amba&hisi pir detection switch 0: off 1: on */
public int pirAlarmEnable;
/** hisi sensitivity 0: low 1: normal 2: high 3: lower 4: lowest */
public int sensitivity;
/** hisi area information */
public long[] areaHisi;
/**
* amba The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule;
/** amba zone information */
public DevMotionDetect.AreaInfo[] areaAmba;
/**
* Alarm area information - amba
*/
public class AreaInfo {
/** enable or not 0 no, 1 yes */
public int enable;
public int x;
public int y;
public int width;
public int height;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
}
}
- Example
IvyCamera.getMotionDetectConfig(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.1.2 Set motion detection configuration
- Description
Set motion detection configuration
public void setMotionDetectConfig(final DevMotionDetect detect, final ISdkCallback<DevMotionDetect> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
detect | Yes | DevMotionDetect | Motion Detection Configuration |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class DevMotionDetect {
/** Whether amba&hisi is enabled 0: off 1: on */
public int enable;
/**
* amba&hisi linkage, bitwise representation
* <p>
* Bit0 Ring
* Bit1 send mail
* Bit2 screenshot
* Bit3 recording
* Bit4 Io output
* Bit5 screenshots uploaded to the cloud
* Bit6 video upload to cloud
* Bit7 mobile push
*/
public int linkage;
/** amba&hisi trigger interval (seconds) */
public int snapInterval;
/** amba&hisi trigger interval (seconds) */
public int triggerInterval;
/** amba&hisi motion detection alarm switch 0: off 1: on */
public int moveAlarmEnable;
/** amba&hisi pir detection switch 0: off 1: on */
public int pirAlarmEnable;
/** hisi sensitivity 0: low 1: normal 2: high 3: lower 4: lowest */
public int sensitivity;
/** hisi area information */
public long[] areaHisi;
/**
* amba The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule;
/** amba zone information */
public DevMotionDetect.AreaInfo[] areaAmba;
/**
* Alarm area information - amba
*/
public class AreaInfo {
/** enable or not 0 no, 1 yes */
public int enable;
public int x;
public int y;
public int width;
public int height;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
}
}
- Example
IvyCamera.setMotionDetectConfig(DevMotionDetect, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.2 Sound Detection
7.4.2.1 Get sound detection configuration
- Description
Get sound detection configuration
public void getAudioDetectConfig(final ISdkCallback<DevAudioDetect> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* ·FosVideo region is divided into 10*10 sub areasideo region is divided into 10*10
* sub areas
* The min unit of schedule is half an hour, scheduleN value range
* 2N-1(N[0-48])
* .areaN value 2N -1(N[0-10])
*/
public class DevAudioDetect {
/**
* Is enable motion detect alarm
*/
public int enable;
/**
* Motion alarm linkage( bit3 | bit2 | bit1 | bit0 )
* bit0: Ring
* bit1: Send mail
* bit2:Snap picture
* bit3: Record
*/
public int linkage;
/**
* The interval time to snap picture again
*/
public int snapInterval;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
/**
* The time of which motion detect alaram can
* trigger again when a motion detection has happened.
*/
public int triggerInterval;
/**
* The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule = new long[7];
}
- Example
IvyCamera.getAudioDetectConfig( new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.2.2 Set sound detection configuration
- Description
Set sound detection configuration
public void setAudioDetectConfig(final DevAudioDetect detect, final ISdkCallback<DevAudioDetect> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
detect | Yes | DevAudioDetect | Audio Detection Configuration |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* ·FosVideo region is divided into 10*10 sub areasideo region is divided into 10*10
* sub areas
* The min unit of schedule is half an hour, scheduleN value range
* 2N-1(N[0-48])
* .areaN value 2N -1(N[0-10])
*/
public class DevAudioDetect {
/**
* Is enable motion detect alarm
*/
public int enable;
/**
* Motion alarm linkage( bit3 | bit2 | bit1 | bit0 )
* bit0: Ring
* bit1: Send mail
* bit2:Snap picture
* bit3: Record
*/
public int linkage;
/**
* The interval time to snap picture again
*/
public int snapInterval;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
/**
* The time of which motion detect alaram can
* trigger again when a motion detection has happened.
*/
public int triggerInterval;
/**
* The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule = new long[7];
}
- Example
IvyCamera.setAudioDetectConfig( new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.3 Human Detection
7.4.3.1 Get humanoid detection configuration
- Description
Get the humanoid detection configuration
public void getPedestrianDetectConfig(final ISdkCallback<PedestrianDetectConfig> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Humanoid filter
* Mobile tracking
*/
public class PedestrianDetectConfig {
/**
* Is enable motion detect alarm
*/
public int isEnable;
/**
* 0:default 1:senior
*/
public int isTrackEnable;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
/**
* Trigger interval
*/
public int snapInterval;
/**
* 0:tilted 1:plane
*/
public int triggerInterval;
/**
* Motion alarm linkage( bit3 | bit2 | bit1 | bit0 )
* bit0: Ring
* bit1: Send mail
* bit2:Snap picture
* bit3: Record
*/
public int linkage;
}
- Example
IvyCamera.getPedestrianDetectConfig(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.3.2 Set the humanoid detection configuration
- Description
Set up human detection configuration
public void setPedestrianDetectConfig(final PedestrianDetectConfig detect, final ISdkCallback<PedestrianDetectConfig> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
detect | Yes | PedestrianDetectConfig | PedestrianDetectConfig |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Humanoid filter
* Mobile tracking
*/
public class PedestrianDetectConfig {
/**
* Is enable motion detect alarm
*/
public int isEnable;
/**
* 0:default 1:senior
*/
public int isTrackEnable;
/**
* Motion detect sensitivity
* 0 : Low
* 1: Normal
* 2: High
* 3: Lower
* 4: Lowest
*/
public int sensitivity;
/**
* Trigger interval
*/
public int snapInterval;
/**
* 0:tilted 1:plane
*/
public int triggerInterval;
/**
* Motion alarm linkage( bit3 | bit2 | bit1 | bit0 )
* bit0: Ring
* bit1: Send mail
* bit2:Snap picture
* bit3: Record
*/
public int linkage;
}
- Example
IvyCamera.setPedestrianDetectConfig(PedestrianDetectConfig, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.3.3 Obtaining a license from the device
- Description
Get a license from the device
public void getPedestrianLicenseDeviceInfo(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getPedestrianLicenseDeviceInfo(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.4.3.4 Write license to device
- Description
write license to device
public void setPedestrianLicense(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setPedestrianLicense(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.5 Device Hibernation
7.5.1 Get hibernation
- Description
get sleep state
public void getSleepMode(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getSleepMode(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
sleep state not enabled 0; sleep 1; wake up 2; end 3;
7.5.2 Device Wakeup
- Description
Device wakes up
public void deviceWakeUp(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.deviceWakeUp(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.5.3 Device Wakeup
- Description
device sleep
public void deviceSleep(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.deviceSleep(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.6 Reboot the device
- Description
reboot device
public void rebootDevice(final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.rebootDevice(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.7 WDR switch
7.7.1 Get the WDR switch
- Description
Get the WDR switch
public void getWDRMode(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.rebootDevice(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
0 off; 1 on
7.7.2 Setting the WDR switch
- Description
Set the WDR switch
public void setWDRMode(final boolean open, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
open | Yes | int | 1 to open; 0 to close |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setWDRMode(open, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.8 Power frequency
7.8.1 Get power frequency
- Description
get power frequency
public void getPowerFrequency(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getPowerFrequency(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
0 50hz;1 60hz;2 Outdoor Mode
7.8.1 Setting the power frequency
- Description
Set the power frequency
public void setPowerFrequency(final int frequency, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
frequency | Yes | int | 0 50hz;1 60hz;2 Outdoor Mode |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setPowerFrequency(frequency, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.9 Beep Switch
7.9.1 Get the sound switch status
- Description
Get the sound switch status
public void getVoiceTipState(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getVoiceTipState(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.9.2 Set the status of the beep switch
- Description
Set the tone switch state
public void setVoiceTipState(final boolean isEnable, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
isEnable | Yes | int | false to close; true to open |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setVoiceTipState(isEnable, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.10 Status Light Switch
7.10.1 Get status light switch status
- Description
Get status light switch status
public void getLedEnableState(final ISdkCallback<Integer> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.getLedEnableState( new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.10.2 Set status light switch status
- Description
Set the status light switch state
public void setLedEnableState(final int enable, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
isEnable | Yes | int | 0 off; 1 on |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setLedEnableState(enable, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.11 OSD Settings
7.11.1 Get OSD
- Description
get osd
public void getOSDSetting(final ISdkCallback<OSDSetting> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class OSDSetting {
/** Time stamp will display on screen or not */
public int isEnableTimeStamp;
/** Camera name will display on screen or not */
public int isEnableDevName;
/** OSD display position, currently can only be 0 */
public int dispPos;
/** Is OSD mask effective */
public int isEnableOSDMask;
/** TempAndHumid will display on screen or not */
public int isEnableTempAndHumid;
}
- Example
IvyCamera.getOSDSetting(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.11.1 Setting the OSD
- Description
set osd
public void setOSDSetting(final OSDSetting osdSetting, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
osdSetting | Yes | OSDSetting | osd operation object |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
public class OSDSetting {
/** Time stamp will display on screen or not */
public int isEnableTimeStamp;
/** Camera name will display on screen or not */
public int isEnableDevName;
/** OSD display position, currently can only be 0 */
public int dispPos;
/** Is OSD mask effective */
public int isEnableOSDMask;
/** TempAndHumid will display on screen or not */
public int isEnableTempAndHumid;
}
- Example
IvyCamera.getOSDSetting(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.12 Night Vision Project
7.12.1 Get night vision plan
- Description
Get the night vision plan
public void getNightVisionSchedule(final ISdkCallback<ScheduleInfraledConfig> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* N:[0-2], the number of infra led switch schedule
*/
public class ScheduleInfraledConfig {
/**
* Start hour
*/
public int[] startHour = new int[3];
/**
* Start Minitue
*/
public int[] startMin = new int[3];
/**
* End hour
*/
public int[] endHour = new int[3];
/**
*End minitue
*/
public int[] endMin = new int[3];
}
- Example
IvyCamera.getNightVisionSchedule(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.12.2 Setting the night vision schedule
- Description
Set up a night vision schedule
public void setNightVisionSchedule(final ScheduleInfraledConfig ledConfig, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
ledConfig | Yes | ScheduleInfraledConfig | Night Vision Schedule Object |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* N:[0-2], the number of infra led switch schedule
*/
public class ScheduleInfraledConfig {
/**
* Start hour
*/
public int[] startHour = new int[3];
/**
* Start Minitue
*/
public int[] startMin = new int[3];
/**
* End hour
*/
public int[] endHour = new int[3];
/**
*End minitue
*/
public int[] endMin = new int[3];
}
- Example
IvyCamera.getNightVisionSchedule(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.13 Schedule Recording
7.13.1 Get Scheduled Recording Configuration
- Description
Get the planned recording configuration (only support SD/FTP recording)
public void getScheduleRecordingConfig(final ISdkCallback<ScheduleRecordConfig> callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* The min unit of schedule is half an hour,
* scheduleN value range 2N -1(N[0-48])
*/
public class ScheduleRecordConfig {
/** Schedule-Record enable status, 0-disable, 1-enable*/
public int isEnable;
/**
* Level for drop frame,
* 0 - 30/30,
* 1 - 24/30,
* 2 - 15/30,
* 3 - 8/30,
* 4 - 4/30,
* 5 - 1/30;
* */
public int recordLevel;
/***
* The process method when SD card is full,
* 0-cover the oldest video and continue record,
* 1-stop record
*/
public int spaceFullMode;
/**Is recording include audio?
* 0-no
* 1-yes
* */
public int isEnableAudio;
/**
* stream type
*/
public int streamType;
/**
* The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule = new long[7];
}
- Example
IvyCamera.getNightVisionSchedule(new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.13.2 Set Scheduled Recording Configuration
- Description
Set the scheduled recording configuration (only support SD/FTP recording)
public void setScheduleRecordingConfig(final ScheduleRecordConfig scheduleConfig, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
scheduleConfig | Yes | ScheduleRecordConfig | Scheduled recording object |
callback | Yes | ISdkCallback | Result callback |
-Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.model;
/**
* Note:
* The min unit of schedule is half an hour,
* scheduleN value range 2N -1(N[0-48])
*/
public class ScheduleRecordConfig {
/** Schedule-Record enable status, 0-disable, 1-enable*/
public int isEnable;
/**
* Level for drop frame,
* 0 - 30/30,
* 1 - 24/30,
* 2 - 15/30,
* 3 - 8/30,
* 4 - 4/30,
* 5 - 1/30;
* */
public int recordLevel;
/***
* The process method when SD card is full,
* 0-cover the oldest video and continue record,
* 1-stop record
*/
public int spaceFullMode;
/**Is recording include audio?
* 0-no
* 1-yes
* */
public int isEnableAudio;
/**
* stream type
*/
public int streamType;
/**
* The motion alaram schedule of one week,
* N = 0(Monday) ~ 6(Sunday)
* For detail, see *1 bellow
*/
public long[] schedule = new long[7];
}
- Example
IvyCamera.setScheduleRecordingConfig(ScheduleRecordConfig, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.14 Cloud configuration related
7.14.1 Online firmware upgrade
- Description
Firmware online upgrade
public void setOnlineUpgrade(final String downloadUrl, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
downloadUrl | Yes | String | Firmware download URL |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setOnlineUpgrade(downloadUrl, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.14.2 Set push configuration
- Description
Set push configuration
public void setPushConfig(final String userTag, final String serverAddress, final int port, final boolean isRichMedia, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
userTag | Yes | String | User Unique ID |
serverAddress | Yes | String | Cloud platform API address |
port | Yes | String | https port, default 443 |
isRichMedia | Yes | Boolean | Whether to support rich media |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setPushConfig("a44ad70c97f84d21b763412119f3397e", "https://test-api.myfoscam.com", "443", true, new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
7.14.3 Set up cloud storage configuration
- Description
Set up cloud storage configuration
public void setCloudRecord(final String userTag, final String streamId, final String serverAddress, final int port, final String macAddr, final ISdkCallback callback)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
userTag | Yes | String | User Unique ID |
streamId | Yes | String | Unique identifier for cloud video storage |
serverAddress | Yes | String | Cloud platform API address |
port | Yes | String | https port, default 443 |
macAddr | Yes | String | Unique device identifier |
callback | Yes | ISdkCallback | Result callback |
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
IvyCamera.setCloudRecord("d85280b8e9e146679197c2dca2f54531", "1a8d226eca789c189403c112b6c1acb5104256400000000232A", "https://test-api.myfoscam.com", "443", "00000000232A", new ISdkCallback() {
@Override
public void onSuccess(Object result) {
}
@Override
public void onError(int errorCode) {
}
@Override
public void onLoginError(int errorCode) {
}
});
8. Generic interface
8.1 SDK common interface
- Description
SDK common interface
public static SDKResponse sendCmd(int handle, int cmd, String cmdJsonData)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
handle | Yes | int | SDK handle |
cmd | Yes | int | Corresponding command ID, APP and device side alignment definition, see reference |
cmdJsonData | Yes | String | Command content, string in json format |
- Returns
SDKResponse returns the command result in json format, including the sdk execution result and the result returned by the device
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
package com.ivyiot.ipclibrary.sdk;
/**
* The SDK is responsible for establishing a channel and transparently transmitting commands from the APP side and the IPC side to each other.
* <p>This class is the command value negotiated between APP and IPC. </p>
*/
public class Cmd {
private Cmd() {
}
/** base -- mark new SDK for 2019 (^v^) */
private static final int BASE_CTRL_MSG = 2019;
public static final int NET_STATE_DISCONNECT = 88;
public static final int NET_STATE_RECONNECT = 89; // IVY Device has no this event, it is reserve
//
public static final int IVY_CTRL_MSG_ADD_ACCOUNT = BASE_CTRL_MSG + 20000;
public static final int IVY_CTRL_MSG_ADD_ACCOUNT_RESP = 22020;
public static final int IVY_CTRL_MSG_DEL_ACCOUNT = 22021;
public static final int IVY_CTRL_MSG_DEL_ACCOUNT_RESP = 22022;
public static final int IVY_CTRL_MSG_CHANGE_USER_INFO = 22023;
public static final int IVY_CTRL_MSG_CHANGE_USER_INFO_RESP = 22024;
public static final int IVY_CTRL_MSG_GET_DEVINFO = 22025;
public static final int IVY_CTRL_MSG_GET_DEVINFO_RESP = 22026;
public static final int IVY_CTRL_MSG_SET_DEVINFO = 22027;
public static final int IVY_CTRL_MSG_SET_DEVINFO_RESP = 22028;
public static final int IVY_CTRL_MSG_GET_DEVABILITY = 22029;
public static final int IVY_CTRL_MSG_GET_DEVABILITY_RESP = 22030;
//media
public static final int IVY_CTRL_MSG_SET_VIDEOSTREAM_PARAM = BASE_CTRL_MSG + 22000;
public static final int IVY_CTRL_MSG_SET_VIDEOSTREAM_PARAM_RESP = 24020;
public static final int IVY_CTRL_MSG_GET_VIDEOSTREAM_PARAM = 24021;
public static final int IVY_CTRL_MSG_GET_VIDEOSTREAM_PARAM_RESP = 24022;
public static final int IVY_CTRL_MSG_SET_VIDEOSTREAM_MODE = 24023;
public static final int IVY_CTRL_MSG_SET_VIDEOSTREAM_MODE_RESP = 24024;
public static final int IVY_CTRL_MSG_GET_VIDEOSTREAM_MODE = 24025;
public static final int IVY_CTRL_MSG_GET_VIDEOSTREAM_MODE_RESP = 24026;
public static final int IVY_CTRL_MSG_SET_IMAGE_PARAM = 24027;
public static final int IVY_CTRL_MSG_SET_IMAGE_PARAM_RESP = 24028;
public static final int IVY_CTRL_MSG_GET_IMAGE_PARAM = 24029;
public static final int IVY_CTRL_MSG_GET_IMAGE_PARAM_RESP = 24030;
public static final int IVY_CTRL_MSG_SET_MOTION_DETECT_CONFIG = 24031;
public static final int IVY_CTRL_MSG_SET_MOTION_DETECT_CONFIG_RESP = 24032;
public static final int IVY_CTRL_MSG_GET_MOTION_DETECT_CONFIG = 24033;
public static final int IVY_CTRL_MSG_GET_MOTION_DETECT_CONFIG_RESP = 24034;
public static final int IVY_CTRL_MSG_SET_VIDEO_MIRROR_FLIP = 24035;
public static final int IVY_CTRL_MSG_SET_VIDEO_MIRROR_FLIP_RESP = 24036;
public static final int IVY_CTRL_MSG_GET_VIDEO_MIRROR_FLIP = 24037;
public static final int IVY_CTRL_MSG_GET_VIDEO_MIRROR_FLIP_RESP = 24038;
public static final int IVY_CTRL_MSG_SET_ENVIRONMENT = 24039;
public static final int IVY_CTRL_MSG_SET_ENVIRONMENT_RESP = 24040;
public static final int IVY_CTRL_MSG_GET_ENVIRONMENT = 24041;
public static final int IVY_CTRL_MSG_GET_ENVIRONMENT_RESP = 24042;
public static final int IVY_CTRL_MSG_SET_OSD_PARAM = 24043;
public static final int IVY_CTRL_MSG_SET_OSD_PARAM_RESP = 24044;
public static final int IVY_CTRL_MSG_GET_OSD_PARAM = 24045;
public static final int IVY_CTRL_MSG_GET_OSD_PARAM_RESP = 24046;
public static final int IVY_CTRL_MSG_SET_AUDIO_VOLUME = 24047;
public static final int IVY_CTRL_MSG_SET_AUDIO_VOLUME_RESP = 24048;
public static final int IVY_CTRL_MSG_GET_AUDIO_VOLUME = 24049;
public static final int IVY_CTRL_MSG_GET_AUDIO_VOLUME_RESP = 24050;
public static final int IVY_CTRL_MSG_GET_VIDEO_STREAM_ABLITY = 24051;
public static final int IVY_CTRL_MSG_GET_VIDEO_STREAM_ABLITY_RESP = 24052;
public static final int IVY_CTRL_MSG_SET_DAY_NIGHT_MODE = 24053;
public static final int IVY_CTRL_MSG_SET_DAY_NIGHT_MODE_RESP = 24054;
public static final int IVY_CTRL_MSG_GET_DAY_NIGHT_MODE = 24055;
public static final int IVY_CTRL_MSG_GET_DAY_NIGHT_MODE_RESP = 24056;
public static final int IVY_CTRL_MSG_SET_NIGHT_VISION_SCHEDULE = 24057;
public static final int IVY_CTRL_MSG_SET_NIGHT_VISION_SCHEDULE_RESP = 24058;
public static final int IVY_CTRL_MSG_GET_NIGHT_VISION_SCHEDULE = 24059;
public static final int IVY_CTRL_MSG_GET_NIGHT_VISION_SCHEDULE_RESP = 24060;
public static final int IVY_CTRL_MSG_SNAP_PICTURE = 24061;
public static final int IVY_CTRL_MSG_SNAP_PICTURE_RESP = 24062;
public static final int IVY_CTRL_MSG_GET_MUSIC_PLAY_STATE = 24063;
public static final int IVY_CTRL_MSG_GET_MUSIC_PLAY_STATE_RESP = 24064;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_START = 24065;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_START_RESP = 24066;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_STOP = 24067;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_STOP_RESP = 24068;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_PREV = 24069;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_PREV_RESP = 24070;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_NEXT = 24071;
public static final int IVY_CTRL_MSG_SET_MUSIC_PLAY_NEXT_RESP = 24072;
public static final int IVY_CTRL_MSG_GET_MUSIC_NAME_LIST = 24073;
public static final int IVY_CTRL_MSG_GET_MUSIC_NAME_LIST_RESP = 24074;
//system
public static final int IVY_CTRL_MSG_SET_SYSTEM_TIME = BASE_CTRL_MSG + 24000;
public static final int IVY_CTRL_MSG_SET_SYSTEM_TIME_RESP = 26020;
public static final int IVY_CTRL_MSG_GET_SYSTEM_TIME = 26021;
public static final int IVY_CTRL_MSG_GET_SYSTEM_TIME_RESP = 26022;
public static final int IVY_CTRL_MSG_REBOOT_SYSTEM = 26023;
public static final int IVY_CTRL_MSG_REBOOT_SYSTEM_RESP = 26024;
public static final int IVY_CTRL_MSG_POWEROFF = 26025;
public static final int IVY_CTRL_MSG_POWEROFF_RESP = 26026;
public static final int IVY_CTRL_MSG_FACTORY_RESET = 26027;
public static final int IVY_CTRL_MSG_FACTORY_RESET_RESP = 26028;
public static final int IVY_CTRL_MSG_PTZ_CONTROL_CMD = 26029;
public static final int IVY_CTRL_MSG_PTZ_CONTROL_CMD_RESP = 26030;
public static final int IVY_CTRL_MSG_GET_DISK_INFO = 26031;
public static final int IVY_CTRL_MSG_GET_DISK_INFO_RESP = 26032;
public static final int IVY_CTRL_MSG_DISK_FORMAT = 26033;
public static final int IVY_CTRL_MSG_DISK_FORMAT_RESP = 26034;
public static final int IVY_CTRL_MSG_SET_ONLINE_UPGRADE = 26035;
public static final int IVY_CTRL_MSG_SET_ONLINE_UPGRADE_RESP = 26036;
public static final int IVY_CTRL_MSG_GET_SD_CARD_INFO = 26037;
public static final int IVY_CTRL_MSG_GET_SD_CARD_INFO_RESP = 26038;
public static final int IVY_CTRL_MSG_SD_CARD_FORMAT = 26039;
public static final int IVY_CTRL_MSG_SD_CARD_FORMAT_RESP = 26040;
public static final int IVY_CTRL_MSG_SET_UPNP_CONIG = 26041;
public static final int IVY_CTRL_MSG_SET_UPNP_CONIG_RESP = 26042;
public static final int IVY_CTRL_MSG_GET_UPNP_CONIG = 26043;
public static final int IVY_CTRL_MSG_GET_UPNP_CONIG_RESP = 26044;
public static final int IVY_CTRL_MSG_SET_LED_CONFIG = 26045;
public static final int IVY_CTRL_MSG_SET_LED_CONFIG_RESP = 26046;// Deprecated
public static final int IVY_CTRL_MSG_GET_LED_CONFIG = 26047;// Deprecated
public static final int IVY_CTRL_MSG_GET_LED_CONFIG_RESP = 26048;// Deprecated
public static final int IVY_CTRL_MSG_SET_MAINTAIN_CONFIG = 26049;// Deprecated
public static final int IVY_CTRL_MSG_SET_MAINTAIN_CONFIG_RESP = 26050;
public static final int IVY_CTRL_MSG_GET_MAINTAIN_CONFIG = 26051;
public static final int IVY_CTRL_MSG_GET_MAINTAIN_CONFIG_RESP = 26052;
public static final int IVY_CTRL_MSG_SET_SILENT_UPGRADE_CONFIG = 26053;
public static final int IVY_CTRL_MSG_SET_SILENT_UPGRADE_CONFIG_RESP = 26054;
public static final int IVY_CTRL_MSG_GET_SILENT_UPGRADE_CONFIG = 26055;
public static final int IVY_CTRL_MSG_GET_SILENT_UPGRADE_CONFIG_RESP = 26056;
public static final int IVY_CTRL_MSG_SWITCH_BUZZER = 26057;
public static final int IVY_CTRL_MSG_SWITCH_BUZZER_RESP = 26058;
public static final int IVY_CTRL_MSG_GET_BPI_BATTERY_STATUS = 26059;
public static final int IVY_CTRL_MSG_GET_BPI_BATTERY_STATUS_RESP = 26060;
public static final int IVY_CTRL_MSG_SET_LED_STATE = 26061;
public static final int IVY_CTRL_MSG_SET_LED_STATE_RESP = 26062;
public static final int IVY_CTRL_MSG_GET_LED_STATE = 26063;
public static final int IVY_CTRL_MSG_GET_LED_STATE_RESP = 26064;
public static final int IVY_CTRL_MSG_SET_VOICE_STATE = 26065;
public static final int IVY_CTRL_MSG_SET_VOICE_STATE_RESP = 26066;
public static final int IVY_CTRL_MSG_GET_VOICE_STATE = 26067;
public static final int IVY_CTRL_MSG_GET_VOICE_STATE_RESP = 26068;
public static final int IVY_CTRL_MSG_SET_NIGHT_LIGHT = 26069;
public static final int IVY_CTRL_MSG_SET_NIGHT_LIGHT_RESP = 26070;
public static final int IVY_CTRL_MSG_GET_NIGHT_LIGHT = 26071;
public static final int IVY_CTRL_MSG_GET_NIGHT_LIGHT_RESP = 26072;
public static final int IVY_CTRL_MSG_SET_AUDIO_ENABLE_STATE = 26073;
// only for foscam bpi
public static final int IVY_CTRL_MSG_SET_AUDIO_ENABLE_STATE_RESP = 26074;
// only for foscam bpi
public static final int IVY_CTRL_MSG_GET_AUDIO_ENABLE_STATE = 26075;
// only for foscam bpi
public static final int IVY_CTRL_MSG_GET_AUDIO_ENABLE_STATE_RESP = 26076;
// only for foscam bpi
//record
public static final int IVY_CTRL_MSG_SET_RECORD_INFO = BASE_CTRL_MSG + 26000;
public static final int IVY_CTRL_MSG_SET_RECORD_INFO_RESP = 28020;
public static final int IVY_CTRL_MSG_GET_RECORD_INFO = 28021;
public static final int IVY_CTRL_MSG_GET_RECORD_INFO_RESP = 28022;
public static final int IVY_CTRL_MSG_GET_RECORD_LIST_RESERVE = 28023;
// reserve
public static final int IVY_CTRL_MSG_GET_RECORD_LIST_RESERVE_RESP = 28024;
// reserve
public static final int IVY_CTRL_MSG_RECORD_FILES_DOWNLOAD = 28025;
public static final int IVY_CTRL_MSG_RECORD_FILES_DOWNLOAD_RESP = 28026;
public static final int IVY_CTRL_MSG_RECORD_PLAYCONTROL_RESERVE = 28027;
// reserve
public static final int IVY_CTRL_MSG_RECORD_PLAYCONTROL_RESERVE_RESP = 28028;
// reserve
public static final int IVY_CTRL_MSG_SET_RECORD_HAS_AUDIO = 28029;
public static final int IVY_CTRL_MSG_SET_RECORD_HAS_AUDIO_RESP = 28030;
public static final int IVY_CTRL_MSG_GET_RECORD_HAS_AUDIO = 28031;
public static final int IVY_CTRL_MSG_GET_RECORD_HAS_AUDIO_RESP = 28032;
public static final int IVY_CTRL_MSG_SET_RECORD_MODE = 28033;
public static final int IVY_CTRL_MSG_SET_RECORD_MODE_RESP = 28034;
public static final int IVY_CTRL_MSG_GET_RECORD_MODE = 28035;
public static final int IVY_CTRL_MSG_GET_RECORD_MODE_RESP = 28036;
public static final int IVY_CTRL_MSG_SET_RECORD_STORE_LOCATION = 28037;
public static final int IVY_CTRL_MSG_SET_RECORD_STORE_LOCATION_RESP = 28038;
public static final int IVY_CTRL_MSG_GET_RECORD_STORE_LOCATION = 28039;
public static final int IVY_CTRL_MSG_GET_RECORD_STORE_LOCATION_RESP = 28040;
public static final int IVY_CTRL_MSG_SET_ENABLE_ALGORITHM = 28041;
public static final int IVY_CTRL_MSG_SET_ENABLE_ALGORITHM_RESP = 28042;
public static final int IVY_CTRL_MSG_GET_ENABLE_ALGORITHM = 28043;
public static final int IVY_CTRL_MSG_GET_ENABLE_ALGORITHM_RESP = 28044;
public static final int IVY_CTRL_MSG_SET_STROGE_CONFIG = 28045;
public static final int IVY_CTRL_MSG_SET_STROGE_CONFIG_RESP = 28046;
public static final int IVY_CTRL_MSG_GET_STROGE_CONFIG = 28047;
public static final int IVY_CTRL_MSG_GET_STROGE_CONFIG_RESP = 28048;
//network
public static final int IVY_CTRL_MSG_SET_NET_PARAM = BASE_CTRL_MSG + 28000;
public static final int IVY_CTRL_MSG_SET_NET_PARAM_RESP = 30020;
public static final int IVY_CTRL_MSG_GET_NET_PARAM = 30021;
public static final int IVY_CTRL_MSG_GET_NET_PARAM_RESP = 30022;
public static final int IVY_CTRL_MSG_SET_WIFI_PARAM = 30023;
public static final int IVY_CTRL_MSG_SET_WIFI_PARAM_RESP = 30024;
public static final int IVY_CTRL_MSG_GET_WIFI_PARAM = 30025;
public static final int IVY_CTRL_MSG_GET_WIFI_PARAM_RESP = 30026;
public static final int IVY_CTRL_MSG_REFRESH_WIFI_AP_LIST = 30027;
public static final int IVY_CTRL_MSG_REFRESH_WIFI_AP_LIST_RESP = 30028;
public static final int IVY_CTRL_MSG_GET_WIFI_AP_LIST = 30029;
public static final int IVY_CTRL_MSG_GET_WIFI_AP_LIST_RESP = 30030;
public static final int IVY_CTRL_MSG_TEST_WIFI = 30031;
public static final int IVY_CTRL_MSG_TEST_WIFI_RESP = 30032;
public static final int IVY_CTRL_MSG_SET_DDNS_CONFIG = 30033;
public static final int IVY_CTRL_MSG_SET_DDNS_CONFIG_RESP = 30034;
public static final int IVY_CTRL_MSG_GET_DDNS_CONFIG = 30035;
public static final int IVY_CTRL_MSG_GET_DDNS_CONFIG_RESP = 30036;
public static final int IVY_CTRL_MSG_SET_P2P_INFO = 30037;
public static final int IVY_CTRL_MSG_SET_P2P_INFO_RESP = 30038;
public static final int IVY_CTRL_MSG_GET_P2P_INFO = 30039;
public static final int IVY_CTRL_MSG_GET_P2P_INFO_RESP = 30040;
public static final int IVY_CTRL_MSG_SET_NETWORK_ADAPTATION = 30041;
public static final int IVY_CTRL_MSG_SET_NETWORK_ADAPTATION_RESP = 30042;
public static final int IVY_CTRL_MSG_GET_NETWORK_ADAPTATION = 30043;
public static final int IVY_CTRL_MSG_GET_NETWORK_ADAPTATION_RESP = 30044;
//alarm
public static final int IVY_CTRL_MSG_SET_AUDIO_ALARM_CONFIG = BASE_CTRL_MSG + 30000;
public static final int IVY_CTRL_MSG_SET_AUDIO_ALARM_CONFIG_RESP = 32020;
public static final int IVY_CTRL_MSG_GET_AUDIO_ALARM_CONFIG = 32021;
public static final int IVY_CTRL_MSG_GET_AUDIO_ALARM_CONFIG_RESP = 32022;
public static final int IVY_CTRL_MSG_SET_IO_ALARM_CONFIG = 32023;
public static final int IVY_CTRL_MSG_SET_IO_ALARM_CONFIG_RESP = 32024;
public static final int IVY_CTRL_MSG_GET_IO_ALARM_CONFIG = 32025;
public static final int IVY_CTRL_MSG_GET_IO_ALARM_CONFIG_RESP = 32026;
public static final int IVY_CTRL_MSG_SET_HUMIDITY_ALARM_CONFIG = 32027;
public static final int IVY_CTRL_MSG_SET_HUMIDITY_ALARM_CONFIG_RESP = 32028;
public static final int IVY_CTRL_MSG_GET_HUMIDITY_ALARM_CONFIG = 32029;
public static final int IVY_CTRL_MSG_GET_HUMIDITY_ALARM_CONFIG_RESP = 32030;
public static final int IVY_CTRL_MSG_SET_TEMPERATURE_ALARM_CONFIG = 32031;
public static final int IVY_CTRL_MSG_SET_TEMPERATURE_ALARM_CONFIG_RESP = 32032;
public static final int IVY_CTRL_MSG_GET_TEMPERATURE_ALARM_CONFIG = 32033;
public static final int IVY_CTRL_MSG_GET_TEMPERATURE_ALARM_CONFIG_RESP = 32034;
public static final int IVY_CTRL_MSG_CLEAN_IO_ALARM_OUTPUT = 32035;
public static final int IVY_CTRL_MSG_CLEAN_IO_ALARM_OUTPUT_RESP = 32036;
public static final int IVY_CTRL_MSG_SET_ONE_KEY_ALARM_CONFIG = 32037;
public static final int IVY_CTRL_MSG_SET_ONE_KEY_ALARM_CONFIG_RESP = 32038;
public static final int IVY_CTRL_MSG_GET_ONE_KEY_ALARM_CONFIG = 32039;
public static final int IVY_CTRL_MSG_GET_ONE_KEY_ALARM_CONFIG_RESP = 32040;
public static final int IVY_CTRL_MSG_SET_PEDESTRIAN_DECTECT_CONFIG = 32041;
public static final int IVY_CTRL_MSG_SET_PEDESTRIAN_DECTECT_CONFIG_RESP = 32042;
public static final int IVY_CTRL_MSG_GET_PEDESTRIAN_DECTECT_CONFIG = 32043;
public static final int IVY_CTRL_MSG_GET_PEDESTRIAN_DECTECT_CONFIG_RESP = 32044;
public static final int IVY_CTRL_MSG_SET_HUMAN_ALARM_CONFIG = 32045;
public static final int IVY_CTRL_MSG_SET_HUMAN_ALARM_CONFIG_RESP = 32046;
public static final int IVY_CTRL_MSG_GET_HUMAN_ALARM_CONFIG = 32047;
public static final int IVY_CTRL_MSG_GET_HUMAN_ALARM_CONFIG_RESP = 32048;
//Foscam Cloud
public static final int IVY_CTRL_MSG_SET_PUSH_CONFIG = BASE_CTRL_MSG + 32000;
public static final int IVY_CTRL_MSG_SET_PUSH_CONFIG_RESP = 34020;
public static final int IVY_CTRL_MSG_GET_PUSH_CONFIG = 34021;
public static final int IVY_CTRL_MSG_GET_PUSH_CONFIG_RESP = 34022;
public static final int IVY_CTRL_MSG_SET_CLOUD_CONFIG = 34023;
public static final int IVY_CTRL_MSG_SET_CLOUD_CONFIG_RESP = 34024;
public static final int IVY_CTRL_MSG_GET_CLOUD_CONFIG = 34025;
public static final int IVY_CTRL_MSG_GET_CLOUD_CONFIG_RESP = 34026;
public static final int IVY_CTRL_MSG_SET_RTMP_CONFIG = 34027;
public static final int IVY_CTRL_MSG_SET_RTMP_CONFIG_RESP = 34028;
public static final int IVY_CTRL_MSG_GET_RTMP_CONFIG = 34029;
public static final int IVY_CTRL_MSG_GET_RTMP_CONFIG_RESP = 34030;
public static final int IVY_CTRL_MSG_SET_ALEXA_ENABLE = 34031;
public static final int IVY_CTRL_MSG_SET_ALEXA_ENABLE_RESP = 34032;
public static final int IVY_CTRL_MSG_GET_ALEXA_ENABLE = 34033;
public static final int IVY_CTRL_MSG_GET_ALEXA_ENABLE_RESP = 34034;
public static final int IVY_CTRL_MSG_SET_ALEXA_SLEEP = 34035;
public static final int IVY_CTRL_MSG_SET_ALEXA_SLEEP_RESP = 34036;
public static final int IVY_CTRL_MSG_SET_ALEXA_SERVER = 34037;
public static final int IVY_CTRL_MSG_SET_ALEXA_SERVER_RESP = 34038;
public static final int IVY_CTRL_MSG_GET_ALEXA_STATE = 34039;
public static final int IVY_CTRL_MSG_GET_ALEXA_STATE_RESP = 34040;
public static final int IVY_CTRL_MSG_SET_ALEXA_WAKEUP = 34041;
public static final int IVY_CTRL_MSG_SET_ALEXA_WAKEUP_RESP = 34042;
public static final int IVY_CTRL_MSG_TEST_PUSH = 34043;
public static final int IVY_CTRL_MSG_TEST_PUSH_RESP = 34044;
public static final int IVY_CTRL_MSG_SET_CHANNEL_SVR_EANBLE_BITS = 34045;
public static final int IVY_CTRL_MSG_SET_CHANNEL_SVR_EANBLE_BITS_RESP = 34046;
public static final int IVY_CTRL_MSG_GET_CHANNEL_SVR_EANBLE_BITS = 34047;
public static final int IVY_CTRL_MSG_GET_CHANNEL_SVR_EANBLE_BITS_RESP = 34048;
//NVR
public static final int IVY_CTRL_MSG_ADD_IPC = BASE_CTRL_MSG + 34000;
public static final int IVY_CTRL_MSG_ADD_IPC_RESP = 36020;
public static final int IVY_CTRL_MSG_DEL_IPC = 36021;
public static final int IVY_CTRL_MSG_DEL_IPC_RESP = 36022;
public static final int IVY_CTRL_MSG_GET_IPC_LIST_INFO = 36023;
public static final int IVY_CTRL_MSG_GET_IPC_LIST_INFO_RESP = 36024;
}
```
- Example
````java
/**
* sdk passthrough command
*
* @param handle connection handle
* @param cmd command value, APP and device side alignment definition
* @param cmdJsonData command content, string in json format
* @return returns the command result in json format
*/
IvyCamera.sendCmd(int handle, int cmd, String cmdJsonData);
8.2 cgi commands
- Description
cgi command, only supports old Foscam machines, not IVY new machines
public static SDKResponse sendCGI(int handle, String cgi)
- Parameters
Name | Necessary | Type | Description |
---|---|---|---|
handle | Yes | int | SDK handle |
cgi | Yes | String | cgi content, format: cmd=cmdName¶m1=parameter1¶m2=parameter2 |
- Returns
SDKResponse returns the command result in json format, including the sdk execution result and the result returned by the device
- Class
com.ivyiot.ipclibrary.model.IvyCamera
- Quote
package com.ivyiot.ipclibrary.sdk;
public interface ISdkCallback<T> {
void onSuccess(T result);//Success
void onError(int errorCode);//Fail
void onLoginError(int errorCode);//Connection failure error
}
- Example
/**
* cgi Command, support Foscam, not support IVY
*
* @param handle handle
* @param cgi cgi format: cmd=cmdName¶m1=value1¶m2=value2
* @return SDKResponse
*/
IvyCamera.sendCGI(int handle, String cgi);