Broadcast Intent

Use Broadcast Intent to tell the plug-in that it has received a camera button operation. Broadcast Intent is also used when the plug-in controls the camera.

Supported by SDK

The SDK supports button events, LED control, and speaker control. For details, please see how to use the SDK.

Receiving Button Events

When the camera button is pressed down or pushed up, Broadcast Intent is set. Combinations of button operation and the intent are as follows:

Button Operation Intent
Pushed down “com.theta360.plugin.ACTION_KEY_DOWN”
Pushed up “com.theta360.plugin.ACTION_KEY_UP”

The button type when pressed down or pushed up is listed below in the Broadcast Intent extension data:

Key Type Description
“keyCode” int 27: Shutter Button, 130: Mode Button, 284: Wireless Button can be specified
“KeyEvent” KeyEvent KeyEvent object received from OS

Control the LEDs

Plug-ins can control LEDs on the camera including LED3, LED4, LED5, LED6, LED7, LED8 (turn on / blink / turn off).

Turning on LEDs

When using “com.theta360.plugin.ACTION_LED_SHOW” with Broadcast Intent, the LED will light up. When using Broadcast Intent, the following extension data must be set:

Key Type Description
target String Choose from “LED3”, “LED4”, “LED5”, “LED6”, “LED7”, “LED8”
color String Choose from “blue”, “green”, “red”, “cyan”, “magenta”, “yellow”, “white”. Default is ”blue”.

With target, set the target LED to be turned on. If target is not specified, Broadcast Intent is ignored. With color, set the luminescent color. Valid only when target is set to LED3.

When Broadcast Intent is used, whether the target LED is already on or already off, processing the LED will be cancelled and start with the requested lighting.

Blinking LEDs

When using “com.theta360.plugin.ACTION_LED_BLINK” with Broadcast Intent, the LED will blink. When using Broadcast Intent, the following extension data must be set:

Key Type Description
target String Choose from “LED3”, “LED4”, “LED5”, “LED6”, “LED7”, “LED8”
color String Choose from “blue”, “green”, “red”, “cyan”, “magenta”, “yellow”, “white”. Default is “blue”.
period int 1-2000 (msec). Default is 2000.

With target, set target LED to blink. If target is not specified, Broadcast Intent is ignored. With color, set the luminescent color. Valid only when target is set to LED3. Use period to set 1 cycle time period.

When Broadcast Intent is used, whether the target LED is already on or already off, processing the LED will be cancelled and start with the requested lighting.

Turning off LEDs

When using “com.theta360.plugin.ACTION_LED_HIDE” with Broadcast Intent, the LED will turn off. When using Broadcast Intent, the following extension data must be set:

Key Type Description
target String Choose from “LED3”, “LED4”, “LED5”, “LED6”, “LED7”, “LED8”

When Broadcast Intent is used, whether the target LED is already on or already off, processing the LED will be cancelled and start with the requested lighting.

With target, set target LED to turn off. If target is not specified, Broadcast Intent is ignored. When Broadcast Intent is used, whether the target LED is already on or already off, processing the LED will be cancelled and start with the requested lighting.

Controlling Speakers

Plug-ins can use the camera’s audio files. Using Broadcast Intent for each audio file you can play audio files.

Audio File Intent
Shutter Audio “com.theta360.plugin.ACTION_AUDIO_SHUTTER”
Shutter Audio Start “com.theta360.plugin.ACTION_AUDIO_SH_OPEN”
Shutter Audio End “com.theta360.plugin.ACTION_AUDIO_SH_CLOSE”
Video Recording Start Audio “com.theta360.plugin.ACTION_AUDIO_MOVSTART”
Video Recording Stop Audio “com.theta360.plugin.ACTION_AUDIO_MOVSTOP”
Self Timer Audio “com.theta360.plugin.ACTION_AUDIO_SELF”
Warning Audio “com.theta360.plugin.ACTION_AUDIO_WARNING”

Controlling WLAN

Plug-ins can control WLAN. WLAN can be controlled by using Broadcast Intent corresponding to each WLAN operation mode.

Operation Mode Intent
OFF “com.theta360.plugin.ACTION_WLAN_OFF”
AP Mode “com.theta360.plugin.ACTION_WLAN_AP”
CL Mode “com.theta360.plugin.ACTION_WLAN_CL”

Updating the Database

RICOH THETA V saves image data in a database. When image data is moved or deleted, it is necessary to update the database so that inconsistencies does not occur in the database.

When using “com.theta360.plugin.ACTION_DATABASE_UPDATE” with Broadcast Intent, the database will be updated. When using Broadcast Intent, the following extension data must be set:

Key Type Description
targets String Array Directory path or file path array

With targets, specify the updated target file. If targets is not specified, Broadcast Intent is ignored. If you specify a directory, the files under that directory will be updated. Specify the path /sdcard/DCIM directory as below. It can be included even if the directory path or file path contains uppercase / lowercase letters.

Example: [“DCIM/100RICOH/R0010001.JPG”,”DCIM/101RICOH”]

Notifying Occurrences of Errors

When using “com.theta360.plugin.ACTION_ERROR_OCCURED” with Broadcast Intent, a notification that an error in the plugin has occurred will be sent. When receiving this notification, the camera plays a warning tone and blinks LED2 in red.

Notifying Completion of Plug-in

When using “com.theta360.plugin.ACTION_FINISH_PLUGIN” with Broadcast Intent, notification of the completion of the plug-in will be sent. When using Broadcast Intent, the following extension data must be set:

Key Type Description
packageName String Package Name
exitStatus String “success” or “failure”. Default is “success”.
message String Optional. Default is an empty string.

With packageName, specify the package name of the plugin itself. With exitStatus, specify “success” when the plug-in ends normally, and “failure” when it ends abnormally. Setting “exitStatus” to “failure” will cause the warning sound to be played and LED2 to blink red.

Notifying Camera Device Control

When using “com.theta360.plugin.ACTION_MAIN_CAMERA_CLOSE” with Broadcast Intent, the fact that the plug-in is controlling camera resources will be reported to the camera, and the Camera API will be able to be used.

When using “com.theta360.plugin.ACTION_MAIN_CAMERA_OPEN” with Broadcast Intent, the fact that the plug-in has released camera resources will be reported to the camera, and the Camera API will not be able to be used.