THETA plugin development (about theta-plugin-sdk)

Check the contents of the SDK for THETA plugin development (theta-plugin-sdk) published on github.

Updated on January 24, 2020: Updated to match the latest SDK (SDK ver.1.0.2-> ver.2.1.0). Fixed broken links.

1.First of all

RICOH THETA V is made of Android OS and did not initially support plug-ins, but [RICOH THETA V] at the end of June Plugin Partner Program Start](https://theta360.com/ja/info/news/2018-06-28-01/) allows you to install your own Android app (= plugin). Check the SDK and documentation here.

To install the developed plug-in on the THETA main unit via the adb command, you need to register as a THETA Plugin developer (a photo of the actual THETA V or Z1 machine is required). The site is on the RICOH Developer Connection, but you don't need to create a RICOH Account because plugin developer registration has nothing to do with the "RICOH Account".

2. Contents of theta-plugin-sdk

Open theta-plugin-sdk (ver.2.1.0) cloned from github in Android Studio. ThetaPluginSDKキャプチャ.png Looking at the source code, it is divided into two parts, app and plugin library. In app, classes such as network are implemented. Until ver.1.x of SDK, pluginlibrary was included as direct source code, but from ver.2.x, it looks like ʻimplementation'com.theta360: pluginlibrary: 2.1.0' in app / build.gradle. It is set up in the form of ʻimport com.theta360.pluginlibrary.activity.PluginActivity; on the code such as MainActivity.java.

(↓ In the case of ver.1.0.2, theta-plugin-library was included as a code (plugin library).) theta-plugin-sdk.png

In theta-plugin-library, implementation corresponding to the specifications specific to the plugin is implemented. If you want to create your own plugin, mainly develop the app part, and if necessary, [theta-plugin] -library](https://github.com/ricohapi/theta-plugin-library) part can be modified. In addition, theta-plugin-sdk allows you to take a still image by pressing the shutter button of THETA V.

When making an existing Android application project into a plug-in, you can use it by importing or copying the necessary parts such as the plugin library from theta-plugin-sdk to the project.

3. Move and see with your smartphone or THETA V

Move it on your Android smartphone or THETA V to see it. Since my smartphone is Android 7.0, I had to change minSdkVersion and targetSdkVersion to API24. I ran the Plugin SDK app on my Android smartphone and saw it. Hello World is displayed (though Theta shouldn't have a screen). You can also run Android apps on THETA in the same way. You can use Vysor to display the screen of THETA.

4. Summary

Plug-in development can be done using Android Studio in the same way as normal Android application development. Classes that implement the functions specific to the THETA V plugin are defined in theta-plugin-sdk. By using the PluginActivity class Controlled THETA, HttpConnector class You can use the functions defined in Web API.

reference

Recommended Posts

THETA plugin development (about theta-plugin-sdk)
astah * plugin development snippet
Plugin development with ImageJ
[Gradle] About Java plug-in tasks
[Eclipse plug-in development] Javadoc acquisition
About the basics of Android development
About the current development environment (Java 8)