@(Working)[API Changes]

Contents discribed in this documents avaliable from SDK V_3.5.11

How to use return values in ControlSDK

  1. ICatchCameraControl.java
    The member methods in this interface class contains two types of return values. for the Boolean value, the method return true if it executes succeed. For the int value you should compare the return value with ICatchError.ICH_SUCCEED, if the return value equals with code ICH_SUCCEED, means the function executes succeed. as follows:
    1. import com.icatchtek.reliant.customer.type.ICatchError;
    2. .....
    3. public boolean startMovieRecord()
    4. {
    5. try {
    6. int retVal = cameraControl.startMovieRecord();
    7. return (retVal == ICatchError.ICH_SUCCEED) ? true : false;
    8. } catch (Exception e) {
    9. Log.i("Start movie record failed with message: " + e.getMessage());
    10. return false;
    11. }
    12. }

How to use download APIs in ControlSDK

  1. 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);

ICatchFrameBuffer getThumbnail(ICatchFile file) throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchBufferTooSmallException, IchInvalidSessionException, IchDeviceException;

ICatchFrameBuffer getQuickview(ICatchFile file) throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchBufferTooSmallException, IchInvalidSessionException, IchDeviceException;

  1. - Download file based on `FTP spec`
  2. ```java
  3. boolean downloadFileQuick(ICatchFile file, String path)
  4. throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException; // do not use this api
  5. boolean downloadFile(ICatchFile file, String path)
  6. throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException;
  7. boolean downloadFile(String srcPath, String dstPath)
  8. throws IchNoSuchFileException, IchSocketException, IchCameraModeException, IchInvalidSessionException, IchDeviceException;
  • We should use API’s based on PTP spec if we known the file’s object handle(The ICatchFile’s getFileHandle() returns a value more than zero).
  • We should use API’s based FTP spec if we do not known the file’s object handle or the file is too large.
  • We should always use APIs based on FTP spec to download video file.
    1. > Special cases:
    2. 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.
    3. 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).