By Hideki Shiro (shrhdk)
Related apps
Library for the WebAPI for RICOH THETA Plug-ins.

theta4j can make it easier to use the WebAPI inside of the THETA Plug-in.


Client implementation of RICOH THETA API v2.1. Contribute to theta4j/theta-web-api development by creating an account on GitHub.


There’s some nice examples in both Kotlin and Java. The Kotlin examples are especially useful if you want to learn Kotlin. The primary example is in the folder plugin-example. It builds with no problems.

package org.theta4j.webapi.example.plugin

import android.os.Bundle
import android.view.KeyEvent
import com.theta360.pluginlibrary.activity.PluginActivity
import com.theta360.pluginlibrary.callback.KeyCallback
import com.theta360.pluginlibrary.receiver.KeyReceiver
import org.theta4j.webapi.CaptureMode
import org.theta4j.webapi.Options.CAPTURE_MODE
import org.theta4j.webapi.Theta
import java.util.concurrent.Executors

class MainActivity : PluginActivity() {

    private val executor = Executors.newSingleThreadExecutor()

    private val theta = Theta.createForPlugin()

    override fun onCreate(savedInstanceState: Bundle?) {

    override fun onResume() {

        executor.submit {
            theta.setOption(CAPTURE_MODE, CaptureMode.IMAGE)

    override fun onPause() {

    private val keyCallback = object : KeyCallback {
        override fun onKeyDown(keyCode: Int, keyEvent: KeyEvent) {
            if (keyCode == KeyReceiver.KEYCODE_CAMERA) {
                executor.submit {

        override fun onKeyUp(keyCode: Int, keyEvent: KeyEvent) {

        override fun onKeyLongPress(keyCode: Int, keyEvent: KeyEvent) {

The README has useful examples.


# THETA Web API Client


Client implementation of [RICOH THETA API v2.1](

Supported environments are Java, JVM languages, Android, and THETA Plug-in.

Tested on RICOH THETA V. Some features for THETA S and SC are not tested.

## Getting Started

Modify your `build.gradle` to include this library.

repositories {
    jcenter() // insert this line

(This file has been truncated. show original)


There’s a few points below that I used when creating a new plug-in from scratch.

Verify theta-plugin-library and theta-web-api

add to build.gradle Project

maven { url '' }




add to build.gradle (Module: app)

    implementation 'com.theta360:pluginlibrary:2.0.0'
    implementation 'org.theta4j:theta-web-api:1.2.2'

Add compile options:

    android {
        compileOptions {
            sourceCompatibility 1.8
            targetCompatibility 1.8

Sync Gradle files.


Add Permission

In AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>

Press Run