theta lib for building API test apps

RICOH THETA API tester built with dio.

Features

  • http post
  • http get
  • theta commands (osc/commands/execute)
  • theta options (osc/commands/execute with payload setOptions)
  • get live preview - returns a stream

Getting started

Works with RICOH THETA Z1 and V. Some features work with the SC2.

Android

Enable use with http instead of the default https only.

project_home/android/app/src/debug/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tpreview_flutter">
    <!-- Flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <application android:usesCleartextTraffic="true" />
</manifest>

Usage

Get camera information

import 'package:theta/theta.dart';
String response = await ThetaBase.get('info');

take picture

import 'package:theta/theta.dart';
String response = await command('takePicture');

set option

import 'package:theta/theta.dart';
String response = await setOption(
    name: 'captureMode', value: 'image');

check command status to see when camera is ready for next command. For example, if you use command('takePicture'), you may want to wait for the camera to be ready before you issue another command. The SC2 take 8 to 9 seconds to be ready for another command.

import 'package:theta/theta.dart' as theta;

while (await theta.commandStatus(id) != 'done') {
  await theta.commandStatus(id);

Additional information

Post questions to:

Libraries

theta
Support for RICOH THETA API testing. [...]