About the API(In interface ICatchCameraPlayback)
int getFileCount() throws IchSocketException, IchCameraModeException, IchNoSuchPathException, IchInvalidSessionException;Use this API to get the camera’s file count.
List<ICatchFile> listFiles(int fileType, int headIndex, int tailIndex, int timeoutInSecs) throws IchSocketException, IchCameraModeException, IchInvalidArgumentException, IchNoSuchPathException, IchInvalidSessionException;Use this API to get file by range, the headIndex specifies the start index, the tailIndex specifies the end index.
Samples to show to to get files by range
try {ICatchCameraPlayback playback = cameraSession.getPlaybackClient();int fileCount = playback.getFileCount();List<ICatchFile> files = playback.listFiles(ICH_FILE_TYPE_IMAGE, 1, 10, 10);for (ICatchFile file : files) {Log.i("__main_activity__", "1-10, file: " + file.getFileHandle() + ", name: " + file.getFileName());}files = playback.listFiles(ICH_FILE_TYPE_IMAGE, 11, 20, 10);for (ICatchFile file : files) {Log.i("__main_activity__", "11-20, file: " + file.getFileHandle() + ", name: " + file.getFileName());}Log.i("__main_activity__", "file Count: " + fileCount);}catch (Exception ex) {Log.i("__main_activity__", "capture photo record failed, exception: " + ex.getMessage());}
