Tutorial: My First Plug-in - Easy Guide for Novice Developers


#1

My First Plug-in

This is a new addition to the Plug-in Development Getting Started Guide

Step-by-step video

../_images/cover.png

RICOH Developer Connection GitHub

Go to https://github.com/ricohapi

../_images/ricoh-developer-connection.png

Locate theta-plugin-camera-api-sample

../_images/theta-plugin-camera-api.png

Download, Unzip, Open in Android Studio

image

Go to the plugin folder in your Project view.

../_images/plugin-studio.png

Open CameraFragment

../_images/camerafragment.png

Find RIC_PROC_STITCHING

At roughly line 107, look for parameter RIC_PROC_STITCHING .

Change to RicNonStitching

Reference the RICOH official API documentation to find the values for stitching.

Use RicNonStitching .

https://api.ricoh/docs/theta-plugin-reference/camera-api/

Change filename

To help with testing, change the filename string from plugin to fisheye .

Change RIC_PROC_STITCHING in takePicture

In takePicture , look for RIC_PROC_STITCHING . Change the value to RicNonStitching .

Save All and Build apk

../_images/build.png

Locate apk and install

image

Connect camera to your computer with a USB cable.

Use adb install plugin-debug.apk

You can add the path to file by dragging and dropping the file icon onto your command prompt.

Look for a Success after install.

../_images/success.png

Note: Your camera needs to be in Developer Mode. You need to join the partner program to enable Developer Mode. It’s free to join the partner program as of Oct 2018.

Use Vysor to Set Permissions

Install Vysor.

Go to Settings .

Go to Apps

../_images/vysor-apps.png

Select CameraAPI Capture Plugin

Select Permissions

Enable Camera, Microphone, Storage

image

Confirm that Permissions are enabled.

../_images/vysor-perm-good.png

Take Picture

You can now use Vysor to start the plug-in with the camera still attached to USB.

image

If you want to use the camera untethered, you must use the RICOH Desktop app to set the default plug-in to launch. There is additional information on setting the default plug-in in the THETA V Plugin Development Community Guide.

View Images

Connect the THETA V to your computer with a USB cable. You can view the new images you just took with a new image viewer. The THETA acts like a normal camera or mobile phone.

The THETA is called, RICOH THETA V . The images are in Fixed storage > DCIM.

You can view the images by double-clicking on them. Here’s what a sample looks like in Photos.

You can also check the properties for image details.

image

You can view the images in Vysor using the file manager.