Wireless Live Streaming Example

The source code is available on GitHub.

https://github.com/ricohapi/theta-wireless-live-streaming-plugin

You may need to clone the repo with Git Large File Storage if you want to download the pre-compiled apk with the repo. This guide covers working with the source code and compiling it within Android Studio.

Usage of the Wireless Live Streaming plug-in is covered extensively in the Plug-in User Guide (free registration to community required).

Import Project

You do not need to build from source if you want to test the plug-in functionality. You can go to the THETA Store and download the plug-in for free.

After extracting the files, you will see a standard project structure. If you extracted from a zipped file, the pre-compiled apk will not work. You must build from source.

extracted files

In Android Studio, go to File -> New -> Import Project....

import project

Select the wireless-live-streaming project. I needed to change the name of the project to a shorter project name.

select project

After importing into Android Studio, you will see your project files.

project files

Browse Files

Look into the web server and rtmp libraries that the plug-in is using.

NanoHTTPD for web server configuration

One of the more interesting files is the AndroidWebServer that is used for the configuration of the plug-in through a web browser.

simplehttpd

The import statement shows the use of the NanoHTTPD package that is available on GitHub.

nanohttpd

nano on github

By using this technique, you can build a browser-based tool that allows your users to connect to the camera with a mobile phone or desktop computer. See the plug-in user guide for more information on this technique.

configuration gui

rtmp libraries

rtmp libraries

After looking at the file structure, build the package.

Build

build

Ignore the warning about deprecated API.

ignore API warning

Focus on the happier APK(s) generated successfully message.

apk compiled

Install

Use adb to install the apk. The command is adb install app-debug.apk. You can specify by full path of the file on the cmd prompt by dragging the file from File Explorer onto the Command Prompt.

install

Look for the Success status message.

success

Permissions

I suggest you use Vysor to check the permissions of the plug-in.

Go to settings.

settings

Go to Apps. Select Wireless Live Streaming.

apps

Select Permissions.

permissions

Set Camera and Microphone permissions.

camera and microphone permissions

Note that audio streaming is single channel.