@(Working)[API Changes]
Contents discribed in this documents avaliable from SDK V_3.5.11
How to use return values in ControlSDK
- ICatchCameraControl.java
The member methods in this interface class contains two types of return values. for theBooleanvalue, the method return true if it executes succeed. For theintvalue you should compare the return value withICatchError.ICH_SUCCEED, if the return value equals with codeICH_SUCCEED, means the function executes succeed. as follows:import com.icatchtek.reliant.customer.type.ICatchError;.....public boolean startMovieRecord(){try {int retVal = cameraControl.startMovieRecord();return (retVal == ICatchError.ICH_SUCCEED) ? true : false;} catch (Exception e) {Log.i("Start movie record failed with message: " + e.getMessage());return false;}}
How to use download APIs in ControlSDK
- These APIs locates in class
ICatchCameraPlayback.java, These APIs can be divided into two categories.- Download file based on
PTPIP spec```java ICatchFrameBuffer downloadFile(ICatchFile file);
- Download file based on
ICatchFrameBuffer getThumbnail(ICatchFile file) throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchBufferTooSmallException, IchInvalidSessionException, IchDeviceException;
ICatchFrameBuffer getQuickview(ICatchFile file) throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchBufferTooSmallException, IchInvalidSessionException, IchDeviceException;
- Download file based on `FTP spec````javaboolean downloadFileQuick(ICatchFile file, String path)throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException; // do not use this apiboolean downloadFile(ICatchFile file, String path)throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException;boolean downloadFile(String srcPath, String dstPath)throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException;
- We should use API’s based on
PTP specif we known the file’s object handle(The ICatchFile’s getFileHandle() returns a value more than zero). - We should use API’s based
FTP specif we do not known the file’s object handle or the file is too large. - We should always use APIs based on
FTP specto download video file.> Special cases:1. As we can see, the methods based on `PTP spec` download file to memory(an `ICatchFrameBuffer instance`). Other APIs based on `FTP spec` download a file to Card.2. Once we take a photo, we will receive a file added event by event listener, the listener's callback arguments contains a `fileValue1` parameters, this parameter contains valid object handle but does not have file name in it. So you should must use API's based on `PTP spec` to download this photo(thumbnails, quickview or the original photo).
