Windows Desktop THETA App Development with Flutter

I’m using Flutter to build Windows desktop applications. As native Windows support in Flutter is still in alpha, the application is only for prototyping and testing. The technique also works on MacOS and Linux. I’ll focus on Windows as many businesses using Windows for desktop applications.

The desktop application connects to the camera with Wi-Fi. To allow Internet access while you connect to the camera, you need two network interfaces. For example, Ethernet and Wi-Fi or two Wi-Fi adapters.

Overview of Steps

I wrote an article on DZone that provides an overview of some of these steps.

Source Code for the Example

Code for this example is available on GitHub

https://github.com/codetricity/oppkey_tester_ricoh_theta

Configuration Video

A video explaining how to configure Flutter to work with Windows is available below.

https://youtu.be/YhF3k68qpOU

Limitations and Strategy

We focused on testing the usability of image rotation and movement on the Windows desktop.

  • application is designed to work with Access Point only. In this setup, the IP address is always 192.168.1.1. Your office router cannot be at this same address if you want to access the Internet at the same time. Although we can modify the application to work with client mode, the THETA SC2 does not support Client Mode. For that reason, Access Point mode is a more realistic demonstration.
  • No Ethernet. The SC2 does not support Ethernet connectivity. In our tests, the Z1 also could not maintain Ethernet connectivity indefinitely as the battery would slowly drain. For these reasons, we are only using the simple AP mode with Wi-Fi.
  • No USB connection. I have a separate app that controls the THETA using a USB cable. I have it working on a Raspberry Pi. Example 1, Example 2. I decided not to incorporate USB access into this demonstration as I mainly have examples on Linux desktops and devices such as the Jetson and Raspberry Pi. There doesn’t seem to be too much interest in using the USB connection in business scenarios.

Comparison to Mobile App

  • distribution is easier on Android and iOS. Especially for Android, it is easy to put up a test app on the Play store and distribute it. For Windows desktop, the technique we used requires the distribution of libraries from Visual Studio.
  • development workflow is easier with a native desktop application because you don’t have to deal with an emulator, the connection between your IDE and the emulator, and the connection between the emulator and your camera.
  • once the application is finished, the performance on the desktop and mobile are the same. However, during development, performance of the mobile app graphics can be slower due to emulation overhead.

Screenshots

app_demo

app_demo_2

Extending with More THETA API Commands

We test the THETA API using Dart command line scripts.

Additional tests are available here:

https://github.com/codetricity/sc2-public-code-examples