Events

You can receive camera events of the connected camera using the CameraEventListener class.

Contents

Supported Camera Events

RICOH Camera Wireless SDK supports the following camera events:

Register Events

Override the virtual method corresponding to the event you want to receive in your derived class of CameraEventListener. You can also see Live View for an example of liveViewFrameUpdated.

class UserEventListener extends CameraEventListener {
    @Override
    public void imageStored(CameraDevice sender, CameraImage image) {
        System.out.printf("Image Stored. Name: %s%n", image.getName());
    }

    @Override
    public void captureComplete(CameraDevice sender, Capture capture) {
        System.out.printf("Capture Complete. Caputure ID: %s%n", capture.getId());
    }

    @Override
    public void deviceDisconnected(CameraDevice sender) {
        System.out.println("Device Disconnected.");
    }
}

And register the event listener as follows:

CameraEventListener userEventListener = new UserEventListener();
cameraDevice.addEventListener(userEventListener);

Registered events are called when corresponding events occur at CameraDevice.

See Also

  • Capture - Demonstrates how to capture images.
  • Connection - Demonstrates how to make connections with cameras.
  • Live View - Describes liveViewFrameUpdated.