Simple Explanation of Broadcast Intent for RICOH THETA Development

The official RICOH documentation for broadcast intents can be daunting for new plug-in developers.

To push a button, this is the documentation

If you look up the official Android documentation on intents, it can also be confusing.

The information is there, but it’s not friendly for people new to Android development.

Tip: Supplement the Documentation on Broadcast Intent With the pluginlibrary

First, if you use the thetapluginlibrary, you can use easier library calls to control the LEDs and buttons.

Easy Example


This is easier than the Intent example

Intent Example

    // this is not needed
    Intent led3Intent = new Intent("com.theta360.plugin.ACTION_LED_SHOW");
    led3Intent.putExtra("target", LedTarget.LED3.toString());
    led3Intent.putExtra("color", LedColor.MAGENTA.toString());

The example using an Intent duplicates the pluginlibrary method notificationLed3Show. It’s easier to use the library.

Easy Example


Intent Example

The packageName org.codecakes.broadcastintent is the package of the project I created. This your unique project, the one you are building.

protected void onDestroy() {

    // not needed
    Intent finishIntent =  new Intent("com.theta360.plugin.ACTION_FINISH_PLUGIN");
    finishIntent.putExtra("packageName", "org.codecakes.broadcastintent");
    finishIntent.putExtra("exitStatus", "success");

Once you figure out the basic syntax of the broadcast intent, it’s straighforward to implement.

Close Camera

To use the CameraAPI, you’ll need to close the main RICOH camera app.

    Intent closeCameraIntent = new Intent("com.theta360.ACTION_MAIN_CAMERA_CLOSE");

Open Camera

You need to send control back to the camera.

protected void onPause() {

    Intent openCameraIntent = new Intent("com.theta360.plugin.ACTION_CAMERA_OPEN");

Minimal Code Example

Jump to the good stuff.

1 Like