GithubHelp home page GithubHelp logo

ricohapi / theta-client Goto Github PK

View Code? Open in Web Editor NEW
13.0 19.0 10.0 27.77 MB

A library to control RICOH THETA

License: MIT License

Kotlin 57.58% Ruby 0.17% Swift 9.17% Objective-C 0.56% Dart 17.21% Shell 0.02% JavaScript 0.10% Objective-C++ 0.04% TypeScript 14.84% Java 0.25% C 0.01% HTML 0.02% CSS 0.05%
ricoh ricoh360 theta flutter react-native vr android ios kotlin-multiplatform

theta-client's Introduction

THETA Client

theta-client CI with Gradle KDoc

Kotlin Swift Flutter React Native

This library provides a way to control RICOH THETA using RICOH THETA API v2.1. Your app can perform the following actions:

  • Take a photo and video
  • Acquire a list of photos and videos
  • Acquire a JPEG file and MP4 file
  • Acquire the status of THETA
  • Acquire and set properties of THETA

Supported Environments

  • Android native (Kotlin)
  • iOS native (Swift)
  • React Native
  • Flutter

Supported Models

  • THETA X
  • THETA Z1
  • THETA V
  • THETA SC
  • THETA S (firmware version 01.62 or later)

Directory Structure

  • theta-client
    • demos: Demo applications
    • docs: Documentation
    • kotlin-multiplatform: Library body (Kotlin Multiplatform Mobile)
    • react-native: React Native package
    • flutter: Flutter plugin

Build

Android (aar)

theta-client$ ./gradlew publishToMavenLocal

aar is output to theta-client/kotlin-multiplatform/build/outputs/aar

iOS (XCFramework)

theta-client$ ./gradlew podPublishXCFramework

XCFramework is output to theta-client/kotlin-multiplatform/build/cocoapods/publish

ReactNative & Flutter

See README in each directory.(react-native, flutter)

Test

theta-client$ ./gradlew testReleaseUnitTest

How to Use

See tutorials in docs directory and API reference of this library. Demo applications in demos directory may help you understand how to use this library.

Verification tool

A tool, written in React Native, is prepared to verify the responses and behavior of Theta to verious requests. Using this verification tool, you can select and send a command with its parameters then its response is displayed in JSON converted from Android or iOS object.

menu screen info screen capture screen

License

MIT License

Useful guides

theta-client's People

Contributors

airtechwick avatar hosoric avatar lassickageyama avatar lassicym avatar osakila avatar simago avatar ywatanabe-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theta-client's Issues

Sdk is not compatible with xcode 15

When trying to run the command ./gradlew podPublishXCFramework I am encountering the following error:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':kotlin-multiplatform:linkPodDebugFrameworkIosArm64'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:145)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:143)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:131)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:402)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:389)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:382)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:368)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
Caused by: org.jetbrains.kotlin.backend.konan.KonanCompilationException: Compilation finished with errors
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:171)
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:169)
        at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:22)
        at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:16)
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithRenderer(K2Native.kt:169)
        at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:187)
        at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
        at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
        at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:20)
        at org.jetbrains.kotlin.cli.utilities.MainKt.inProcessMain(main.kt:58)
        at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:192)
        at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:133)
        at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeLink.kt:347)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.TaskExecution$2.run(TaskExecution.java:239)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:224)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:207)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:190)
        at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:168)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:53)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:50)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:40)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:61)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:42)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:188)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
        at org.gradle.internal.Either$Right.fold(Either.java:175)
        at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:38)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:27)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:109)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:56)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:56)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:73)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:89)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:50)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:114)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:57)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:76)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:50)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:93)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:93)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:43)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:31)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.withWorkspace(TaskExecution.java:284)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:142)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:131)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:402)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:389)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:382)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:368)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)```
        
  Apparently, version 1.8.20 of Kotlin is not compatible with Xcode 15.

EV値のSetOptionsに失敗する

SetOptionsでEV値を設定しようとした際、下記エラーログが出る。ISO値を設定した場合は成功する。

[Error: No enum constant com.ricoh360.thetaclient.ThetaRepository.ExposureCompensationEnum.P_2_0]

コードは以下

      const options: Options = {iso: IsoEnum.ISO_2000};
      setOptions(options).then(...

fake-theta compatibility

Does theta-client work with fake-theta?

I'm using this endpoint in a Flutter app.

  final endpoint = 'https://fake-theta.vercel.app';

I am accessing listFiles like this:

 var imageList =
            await _thetaClient.listFiles(FileTypeEnum.image, 2);

I am getting this error:

E/flutter (32599): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(NotConnectedException, java.lang.NullPointerException, null, null)
E/flutter (32599):

This is the output.

I/flutter (32599): call listFiles
I/System.out(32599): HttpClient: REQUEST: https://fake-theta.vercel.app/osc/commands/execute
I/System.out(32599): METHOD: HttpMethod(value=POST)
I/System.out(32599): COMMON HEADERS
I/System.out(32599): -> Accept: application/json
I/System.out(32599): -> Accept-Charset: UTF-8
I/System.out(32599): -> Cache-Control: no-cache
I/System.out(32599): CONTENT HEADERS
I/System.out(32599): -> Content-Length: 126
I/System.out(32599): -> Content-Type: application/json; charset=utf-8
I/System.out(32599): BODY Content-Type: application/json; charset=utf-8
I/System.out(32599): BODY START
I/System.out(32599): {"name":"camera.listFiles","parameters":{"fileType":"image","startPosition":0,"entryCount":2,"maxThumbSize":0,"_detail":true}}
I/System.out(32599): BODY END
D/TrafficStats(32599): tagSocket(125) with statsTag=0xffffffff, statsUid=-1
I/System.out(32599): HttpClient: RESPONSE: 200 OK
I/System.out(32599): METHOD: HttpMethod(value=POST)
I/System.out(32599): FROM: https://fake-theta.vercel.app/osc/commands/execute
I/System.out(32599): COMMON HEADERS
I/System.out(32599): -> Cache-Control: public, max-age=0, must-revalidate
I/System.out(32599): -> Connection: keep-alive
I/System.out(32599): -> Content-Length: 474
I/System.out(32599): -> Content-Type: application/json; charset=utf-8
I/System.out(32599): -> Date: Fri, 28 Apr 2023 13:24:56 GMT
I/System.out(32599): -> Etag: W/"1da-hHC5yGdk33EyyPKk7kdMEU5xSy8"
I/System.out(32599): -> Server: Vercel
I/System.out(32599): -> Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
I/System.out(32599): -> X-Vercel-Cache: MISS
I/System.out(32599): -> X-Vercel-Id: sfo1::iad1::lhxgq-1682688296310-f744396b0ed8
I/System.out(32599): BODY Content-Type: application/json; charset=utf-8
I/System.out(32599): BODY START
I/System.out(32599): {"results":{"entries":[{"dateTime":"2015:07:10 11:05:18","_favorite":false,"fileUrl":"https://fake-theta.vercel.app/files/100RICOH/R0010001.JPG","isProcessed":true,"name":"R0010001.JPG","previewUrl":"","size":4051440},{"dateTime":"2015:07:10 11:05:18","_favorite":false,"fileUrl":"https://fake-theta.vercel.app/files/100RICOH/R0010002.JPG","isProcessed":true,"name":"R0010002.JPG","previewUrl":"","size":4051440}],"totalEntries":10},"name":"camera.listFiles","state":"done"}
I/System.out(32599): BODY END
E/flutter (32599): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(NotConnectedException, java.lang.NullPointerException, null, null)
E/flutter (32599):

In addition to the error, I cannot access the ThetaFiles.fileList and ThetaFiles.totalEntries properties.

How can I use theta-client with fake-theta for the basic APIs supported by fake-theta?

The same listFiles command works with a normal http.post command in my Flutter app. At the moment, I am forced to build the app with the http package instead of theta-client. However, I would like to use theta-client.

Connection issue with Android demo project

Hi there, I'm running the Android demo, it works without issue for SC2, whereas there is a small problem after capturing with SC and going back to the preview page, sometimes it's freezing and sometimes it throws an error like the video shows.

The error is as follows
E/ThetaViewModel$startPreview: com.ricoh360.thetaclient.PreviewClientException: Forbidden at com.ricoh360.thetaclient.PreviewClientImpl.responseStatus(PreviewClient.kt:367) at com.ricoh360.thetaclient.PreviewClientImpl.access$responseStatus(PreviewClient.kt:73) at com.ricoh360.thetaclient.PreviewClientImpl$responseStatus$1.invokeSuspend(Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Thanks in advance!!!

statusが取得できない

以下を叩くAPIが無いため。撮影後に即時引き取りを実現するために利用したい。

/osc/commands/status

Support Image Bitrate Settings by BitrateNumber?

Can I set the Image Bitrate to a number between 1048576 and 20971520 ?

I can see that BitrateNumber accepts an int value. However, the documentation indicates that this is the "Movie bit rate value". Can I use this to set the Image bitrate value? I have not had success setting the Image Bitrate using the BitrateNumber.

/// Movie bit rate value of number.

The use case is to reduce the size the THETA X 11K images by manipulating the bitrate more precisely. The file size needs to be reduced to improve image load times. There is a blank screen while the image is loading and I want to reduce the time the person sees the blank screen. Current solution is to reduce the resolution of the 11K image to 7K, which reduces the reason to use the THETA X. I don't know if the bitrate solution would help, but I would like to show more examples. This is for the interior shot of an automobile for used car sales using the THETA X.

For the Image Bitrate, do I just have these values? Or, can I use theta-client to adjust it to a specific number?

  static final auto = Bitrate._internal('AUTO');
  static final fine = Bitrate._internal('FINE');
  static final normal = Bitrate._internal('NORMAL');
  static final economy = Bitrate._internal('ECONOMY');

  static final values = [auto, fine, normal, economy];

With camera in image mode, this is what I'm using to test the bitrate and present examples to automotive software developers.

image

If I bypass theta-client, this will work using an http request (not using theta-client):

final body = {
  'name': 'camera.setOptions',
  'parameters': {
    'options': {'_bitrate': '5242880'}
  }
};

Thus, I can set the bitrate in my application. However, I'm trying to move the requests to theta-client for practice. This is not urgent as my application is working using a standard http request. I'm just wondering what the capabilities of theta-client are.

I am getting the value of the bitrate with theta-client and I get the correct numerical value (not the string NORMAL or FINE), which is what I expect.

final responseOptions = await _thetaClientFlutter
    .getOptions([OptionNameEnum.bitrate]);

Preview Client Issue

@yohei @japboy @togacy @mhirose
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
_binding = FragmentThetaCameraBinding.inflate(inflater, container, false)
return binding.root
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    super.onViewCreated(view, savedInstanceState)


    lifecycleScope.launch {

        val thetaUrl = "https://fake-theta.vercel.app/"
        val thetaConfig = ThetaRepository.Config()
        thetaConfig.language = ThetaRepository.LanguageEnum.EN_US
        thetaConfig.shutterVolume = 40 // 0 to 100
        thetaConfig.sleepDelay = ThetaRepository.SleepDelayEnum.SLEEP_DELAY_5M
        thetaConfig.offDelay = ThetaRepository.OffDelayEnum.DISABLE
        thetaRepository = newInstance(thetaUrl, thetaConfig)
        thetaRepository?.getOptions(
            listOf(
                ThetaRepository.OptionNameEnum.CameraMode,
                ThetaRepository.OptionNameEnum.PreviewFormat,
                ThetaRepository.OptionNameEnum.CameraControlSource,
                ThetaRepository.OptionNameEnum.CaptureMode
            )
        )?.let { thetaRepository?.setOptions(it)

        }
    }


   
     startPreview()
}

private fun startPreview() {
lifecycleScope.launch {
try {
thetaRepository?.getLivePreview()?.collect { byteReadPacket ->

                   if (isActive) {
                       byteReadPacket.inputStream().use {
                           val bitmap = BitmapFactory.decodeStream(byteReadPacket.inputStream())

/ Glide.with(requireContext())
// .load(bitmap)
// .into(binding.imgTheta)
byteReadPacket.release()
}
} else {
Log.e("ThetaCameraFragment", "FALSE")

                   }
               }
           } catch (e: Exception) {
               Log.e("ThetaCameraFragment", "Error during live preview: ${e.message}", e)
               // Handle the error as needed
           }
       }
   }

With this code preview client is not worked
Kindly let me know the process of initializing preview Client

[ RN ] - Slow connection on mid-range or entry-level Android devices

I'm having a probleam to connect and take photos using mid-range or entry-level Android devices.

Every time that I open the camera, it will be lazy to open camera visualization and take the shot.

There is anyone facing the same problem? How to improve speed and perforcance?

Unresolved references problem

Hello! I'm having the same problem over and over again that makes me unable to use the package :(

I have tried both running the demo-flutter and creating a project to add the theta_client_flutter package to it and use it, but in both cases, once everything is set up, built without errors and I try to run, i get the same problems:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (11, 37): Unresolved reference: manufacturer
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (14, 39): Unresolved reference: wlanMacAddress
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (15, 44): Unresolved reference: bluetoothMacAddress
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (17, 35): Unresolved reference: supportUrl
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (21, 28): Unresolved reference: api
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (22, 24): Not enough information to infer type variable V
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (23, 37): Unresolved reference: endpoints
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (24, 44): Unresolved reference: endpoints
e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (26, 33): Unresolved reference: apiLevel

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':theta_client_flutter:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

As you guys can see, some references are not being resolved. I've navigated through the project and noticed that "manufacturer" and rest of references are inside ThetaInfo class in theta_client_flutter.dart.
Something is going wrong and I don't know what it is.

Hope someone can give any clue. Thanks!

Preview Client Error

wM...artPreview com...0.thetaclient.thetaClientDemo E com.ricoh360.thetaclient.PreviewClientException: Permanent Redirect
at com.ricoh360.thetaclient.PreviewClientImpl.responseStatus(PreviewClient.kt:367)
at com.ricoh360.thetaclient.PreviewClientImpl.access$responseStatus(PreviewClient.kt:73)
at com.ricoh360.thetaclient.PreviewClientImpl$responseStatus$1.invokeSuspend(Unknown Source:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

                                                                                                	Which api i need to use @japboy @yohei @togacy @mhirose @okafuku 

Set `imageStitching` params from flutter controller

Hi all,
I am loving this repository (ies), a lot of clean and well documented examples to play around with our Ricoh Theta.

I am trying to control the image stitching (on a theta V) parameter in the photo mode, especially to set it to None to speed up the inter-time between two pictures.

I did not find it in the options that can be set in the photoCaptureBuilder but I get the feeling that this limitation is only due to the fact that:

  1. the imageStitching setting is not exposed by the OptionNameEnum and,
  2. there is no imageStitchingEnum to store the values

(By the way, which would be the correct parameter name to pass to the camera to manage the stitching?)

So far I only found this example but with no code attached.

I would like to know, in your more experienced view, which is the best:

  1. Add the enums to also manage the stitching option on the client side or
  2. add a method to the flutter interface to enable passing transferred options as in the pure-Android example?

In either the cases I will try to implement it and make a pull request to get this feature.

Thanks in advance for your help.

Build failed on android

Build is failing on the newest gradle/ jdk version with the following message:

`FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':theta_client_flutter'.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

 If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    Failed to query the value of property 'buildFlowServiceProperty'.

Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@238420ff of type BuildFlowService.Parameters
A problem occurred configuring project ':theta_client_flutter'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
> Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

       If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 37s
Running Gradle task 'bundleRelease'... 37,7s
Gradle task bundleRelease failed with exit code 1`

It can be solved by adding this lines into build.gradle into section android:

if (project.android.hasProperty('namespace')) { namespace 'com.ricoh360.thetaclient.theta_client_flutter' }

search device and chose device to conect app with react-native

How to proactively connect to device theta 360 via react native

I want to create a section to find a list of devices and select a device that actively connects to my react native. I have read the docs and can't find a solution. Please help me if possible. Thank you.

could not resolve implementation("com.ricoh360.thetaclient:theta-client:1.5.0")

In my compose desktop app, after adding the implementation("com.ricoh360.thetaclient:theta-client:1.5.0") to dependencies and syncing it I get a "Could not resolve: com.ricoh360.thetaclient:theta-client:1.5.0" error.

3d3ed9b4214b8676a65e7f457ea75950

This is my build.gradle.kts file

import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
    kotlin("multiplatform")
    id("org.jetbrains.compose")
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
    google()
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}

kotlin {
    jvm {
        jvmToolchain(11)
        withJava()
    }




  sourceSets {
      val jvmMain by getting {
          dependencies {
              implementation(compose.desktop.currentOs)
              implementation("me.sebj:time:0.4.8")
              implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
              implementation("com.ricoh360.thetaclient:theta-client:1.5.0")

          }
      }
      val jvmTest by getting
   }
  }



  compose.desktop {
      application {
          mainClass = "MainKt"
          nativeDistributions {
              targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
              packageName = "demoapp"
              packageVersion = "1.0.0"
          }
      }
  }
  )

how to change flutter(IOS) Platform version?..

I want to change the version in this theta_client_flutter.podspec file How do I change it.

If change it to " s.Platform = ios ,'12.0' ", it says "Specs satisfying the THETAClient (= 1.1.0) dependency were found, but they required a higher minimum deployment target.".. I want to change to 12.0.. Is it impossible?.. I hope I can change free it
Thank you for reading it.

Connection issue with ios demo project

Hi there, I'm running the ios demo and sometimes it won't connect to the camera after the first connection and I got the logs below. I guess it might be because too many connection requests. Is there a way like disconnecting from the camera or stop the current session so that there won't be an issue with the next connection request.

RPReplay_Final1691114283.MP4
HttpClient: REQUEST: http://192.168.1.1/osc/info
METHOD: HttpMethod(value=GET)
COMMON HEADERS
-> Accept: application/json
-> Accept-Charset: UTF-8
CONTENT HEADERS
-> Content-Length: 0
BODY Content-Type: null
BODY START

BODY END
HttpClient: REQUEST http://192.168.1.1/osc/info failed with exception: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).
HttpClient: REQUEST http://192.168.1.1/osc/info failed with exception: io.ktor.utils.io.errors.PosixException.TimeoutIOException: ETIMEDOUT (60): Operation timed out
https://github.com/ricohapi/theta-client/assets/107428314/bea8758c-7463-4175-a7ff-c250393933ea

Also, I’m using theta sc2, firm version 06.41. I got image decode errors when getting the live frames. It looks like it only successfully decoded some live frames, the rest was failed to be decoded, so the live view is kind of stuck.

09a421edcc908c15da21fd9fe07ce9df55ded0ef_2_1380x892

demo-android has issuing in build

when we import the demo-android, we faced the project build failure with the error.

theta-client-main\theta-client-main\demos\demo-android\app\libs\theta-client-debug.aar.
 > zip END header not found

and we also found that

theta-client-main\theta-client-main\demos\demo-android\app\libs\theta-client-debug.aar

was not defined in app level build.gradle

we also run the below command, but nothing happened.

./gradlew publishToMavenLocal

so how we resolve the build failure issue?

theta-client-react-native initialize() Error: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).

When I call initialize(), sometimes it throws this error:

HttpClient: REQUEST http://192.168.1.1/osc/info failed with exception: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).
Error: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).

Note that the iPhone is connected to the Theta camera Wifi already, and if I tried to call this function several times, it was successful (maybe the second time or third time,...). Almost the time, it failed when trying to connect after the first time installing the app.

The code I implemented. I use WifiManager to connect to the Theta Wifi first then call initialize()

 try {
      await WifiManager.connectToProtectedSSID(thetaSsid, password, false, false)
      await initialize();
    } catch (error) {
      console.warn(`${error}`)
    }

I know it may encounter some error when connecting but in the production, it seems not acceptable.
Please help to figure out the season why this issue happens.
Thanks.

ThetaTimeout not seems to work

I implement connecting to theta camera with the code below.

async function initConnection(thetaIP) {
    const endpoint = `http://${thetaIP}`;
    console.warn(`thetaIP: ${thetaIP}`)
    const config = {
      clientMode: {
        username: [device_username],
        password: [device_password],
      }
    };
    const timeout = {
        connectTimeout: 3000,
        requestTimeout: 3000,
        socketTimeout: 3000
    }
    try {
      const isInit = await initialize(endpoint, config, timeout);
      console.warn(`isInit: ${isInit}`)
      return isInit
    } catch (error) {
      console.warn(`error: ${error}`)
      return false
    }
  }

Everything is OK if I input a correct ip address. But when input an incorrect ip address, the initialization takes a lot of time (over 1 minute) even I set the timeout params already. I printed the error :
error: Error: Failed to connect to InetSocketAddress(hostname=192.168.0.103, port=80).
The console prints out message:
HttpClient: REQUEST http://192.168.0.103/osc/info failed with exception: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.0.103, port=80).

Updated: Check again the console log and see this log appear a long time (~1 minute) before the error catched.

HttpClient: REQUEST: http://192.168.0.103/osc/info
METHOD: HttpMethod(value=GET)
COMMON HEADERS
-> Accept: application/json
-> Accept-Charset: UTF-8
CONTENT HEADERS
-> Content-Length: 0
BODY Content-Type: null
BODY START

BODY END

As I understand, the connectTimeout is set to 3000, that means after 3s connection was not established, the process will throw the timeout error. Or I am understanding wrong behavior of this configuration.
Please help me to verify that it's a misunderstanding or it's a bug.
Thank you guys.

My theta device: Ricoh Theta x
Device to connect: iPhone SE 2020, iOS 17.2.1

Not able to Capture image from camera in release apk in flutter.

I am calling below code to capture still image. This code works in dev mode but when i tested release apk it is throwing an exception.

 photoCapture.takePicture((fileUrl) {
    }, (exception) {
   // getting this error in release apk. works in dev mode.       
    
    // PlatformException(NotConnectedException, com.ricoh360.thetaclient.transferred.UnknownResponse cannot be cast to 
    // com.ricoh360.thetaclient.transferred.TakePictureResponse, null, null)
          });

theta sdk error

hi:
when take picture get error:
SWIFT TASK CONTINUATION MISUSE: takePicture(_:) leaked its continuation!

WHY?????????
My Swift Demo:
func takePicture(_ callback: @escaping (_ url: String) -> Void) async throws {
try await initialize()
let photoCapture: PhotoCapture = try await withCheckedThrowingContinuation {continuation in
thetaRepository!.getPhotoCaptureBuilder().setFilter(filter: ThetaRepository.FilterEnum.hdr).setExposureProgram(program: .aperturePriority)?.setIsoAutoHighLimit(iso: .iso800)?.setAperture(aperture: .aperture56)?.setWhiteBalance(whiteBalance: ThetaRepository.WhiteBalanceEnum.auto_)?.setExposureDelay(delay: .delayOff)?
.build {capture, error in
if let photoCapture = capture {
continuation.resume(returning: photoCapture)
}
if let thetaError = error {
continuation.resume(throwing: thetaError)
}
}
}
class Callback: PhotoCaptureTakePictureCallback {
let callback: (_ url: String?, _ error: Error?) -> Void
init(_ callback: @escaping (_ url: String?, _ error: Error?) -> Void) {
self.callback = callback
}
func onSuccess(fileUrl: String) {
callback(fileUrl, nil)
}
func onError(exception: ThetaException) {
callback(nil, exception as? Error)
}
}
let photoUrl: String = try await withCheckedThrowingContinuation {continuation in
photoCapture.takePicture(
callback: Callback {fileUrl, error in
if let photoUrl = fileUrl {
continuation.resume(returning: photoUrl)
}
if let thetaError = error {
continuation.resume(throwing: thetaError)
}
}
)
}
callback(photoUrl)
}

fileListing fails if images are in 5504x5504 format

On the THETA X, if there are images in 5504x5504 format, the fileListing fails. The debug log shows the proper filelisting content. camera.listFiles works.

Although the 5504x5504 format may not be officially supported, the output of camera.listFiles does work and thus, I can rewrite my app to get the fileListing from camera.listFiles instead use using theta-client. However, I would like to use theta-client.

error

HttpClient: RESPONSE http://192.168.1.1/osc/commands/execute failed with exception: io.ktor.serialization.JsonConvertException: Illegal input

full log

I/System.out(28352): {"name":"camera.listFiles","parameters":{"fileType":"all","startPosition":0,"entryCount":10000,"maxThumbSize":0,"_detail":true}}
I/System.out(28352): BODY END
I/System.out(28352): HttpClient: RESPONSE: 200 OK
I/System.out(28352): METHOD: HttpMethod(value=POST)
I/System.out(28352): FROM: http://192.168.1.1/osc/commands/execute
I/System.out(28352): COMMON HEADERS
I/System.out(28352): -> Connection: Keep-Alive
I/System.out(28352): -> Content-Length: 1525
I/System.out(28352): -> Content-Type: application/json; charset=utf-8
I/System.out(28352): -> User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; RICOH THETA X Build/QKQ1.210402.001)
I/System.out(28352): -> X-Content-Type-Options: nosniff
I/System.out(28352): BODY Content-Type: application/json; charset=utf-8
I/System.out(28352): BODY START
I/System.out(28352): {"results":{"entries":[{"dateTimeZone":"2024:02:19 14:10:37-08:00","_favorite":false,"fileUrl":"http://192.168.1.1/files/100RICOH/R0010007.JPG","height":5504,"_imageDescription":"","isProcessed":true,"name":"R0010007.JPG","previewUrl":"","_projectionType":"","size":5271438,"_storageID":"412176649172527ab3d5edabb50a7d69","_thumbSize":6181,"_uploaded":false,"width":5504},{"dateTimeZone":"2024:02:18 08:09:56-08:00","_favorite":false,"fileUrl":"http://192.168.1.1/files/100RICOH/R0010003.JPG","height":2752,"_imageDescription":"","isProcessed":true,"name":"R0010003.JPG","previewUrl":"","_projectionType":"Equirectangular","size":4214567,"_storageID":"412176649172527ab3d5edabb50a7d69","_thumbSize":10729,"_uploaded":false,"width":5504},{"dateTimeZone":"2024:02:17 14:21:23-08:00","_favorite":false,"fileUrl":"http://192.168.1.1/files/100RICOH/R0010002.JPG","height":2752,"_imageDescription":"","isProcessed":true,"name":"R0010002.JPG","previewUrl":"","_projectionType":"Equirectangular","size":4238256,"_storageID":"412176649172527ab3d5edabb50a7d69","_thumbSize":7534,"_uploaded":false,"width":5504},{"dateTimeZone":"2024:02:17 14:21:15-08:00","_favorite":false,"fileUrl":"http://192.168.1.1/files/100RICOH/R0010001.JPG","height":2752,"_imageDescription":"","isProcessed":true,"name":"R0010001.JPG","previewUrl":"","_projectionType":"Equirectangular","size":4218202,"_storageID":"412176649172527ab3d5edabb50a7d69","_thumbSize":7578,"_uploaded":false,"width":5504}],"totalEntries":4},"name":"camera.listFiles","state":"done"}
I/System.out(28352): BODY END
I/System.out(28352): HttpClient: RESPONSE http://192.168.1.1/osc/commands/execute failed with exception: io.ktor.serialization.JsonConvertException: Illegal input

image

image

with the 5504x5504 file removed

image

other

The official mobile app doesn't list the files in 5504x5504 format, but the other files are listed. This is better behavior than just showing an error. Also, information is in camera.listFiles . Is there any problem showing it?

"fileUrl":"http://192.168.1.1/files/100RICOH/R0010007.JPG","height":5504,"_imageDescription":"","isProcessed":true,"name":"R0010007.JPG","previewUrl":"","_projectionType":"","size":5271438,"_storageID":"412176649172527ab3d5edabb50a7d69","_thumbSize":6181,"_uploaded":false,"width":5504

[ RN ] - Can't init theta-client-sdk on android 14

(EDIT)

I tested using another phone with android 11 and it works. Apparently, there is a problem with Xiaomi Redmi note 12 and Android 14 Hyper OS.

Hi guys, I can't init theta sdk using react-native and android. It's works on old versions but not the latest.

I got this error every time that I try to initialize.
error [Error: Connect timeout has expired [url=http://192.168.1.1/osc/info, connect_timeout=unknown ms]]

This is my implementation

  const initTheta = async () => {
    console.log('initializing...');
    try {
      const endpoint = 'http://192.168.1.1';
      const timeout = {
        connectTimeout: 5000,
        requestTimeout: 5000,
        socketTimeout: 5000,
      };
      const config = {
        clientMode: {
          username: 'THETAYP00123456',
          password: '00123456',
        },
      };

      await initialize(endpoint, config, timeout);
      console.log('initialized.');
    } catch (error) {
      console.log('error', error);
    }
  };

  useEffect(() => {
    initTheta();
  }, []);

I don't know if I need to fill client mode and config objects, but in this case I did.

So, how can I connect with my camera and stop this error??

How to use the bracket shooting added in 1.6?

Hi! I'm really interested in the bracketed shooting that was recently added (not the Z1-specific burst bracketing, but the new autoBracket stuff). iOS/Swift

I'm not sure how to use it. I can set options on my theta repository before calling the builder (photoCaptureBuilder / also looking at shotCountSpecifiedIntervalCaptureBuilder), but the builder is creating its own options and (presumably) blowing away my bracket settings.

Can I use one of the existing builder objects and somehow get the bracket settings in, or do I need to implement my own Capture subclass? (or more likely something obvious I'm missing)

For example, this (hacked adapted from the demo app) takes three photos, but the bracketing information is not honored, and I get three photos back with the same exposure.

Thanks!

func bracket(_ callback: @escaping (_ url: [String]?) -> Void) async throws {
    try await initialize()
    let options = ThetaRepository.Options()
    
    let thing1: ThetaRepository.BracketSetting = ThetaRepository.BracketSetting(
        aperture: .aperture24, 
        colorTemperature: nil, 
        exposureCompensation: .zero, 
        exposureProgram: .manual, 
        iso: .iso400, 
        shutterSpeed: .shutterSpeedOneOver50, 
        whiteBalance: .auto_)
    let thing2: ThetaRepository.BracketSetting = ThetaRepository.BracketSetting(
        aperture: .aperture24, 
        colorTemperature: nil, 
        exposureCompensation: .zero, 
        exposureProgram: .manual, 
        iso: .iso400, 
        shutterSpeed: .shutterSpeedOneOver400, 
        whiteBalance: .auto_)
    let thing3: ThetaRepository.BracketSetting = ThetaRepository.BracketSetting(
        aperture: .aperture24, 
        colorTemperature: nil, 
        exposureCompensation: .zero, 
        exposureProgram: .manual, 
        iso: .iso400, 
        shutterSpeed: .shutterSpeedOneOver1600, 
        whiteBalance: .auto_)
        
    let settingArray: [ThetaRepository.BracketSetting] = [thing1, thing2, thing3]
    let wtfbbq = NSMutableArray(array: settingArray)
    let settingList = ThetaRepository.BracketSettingList(list: wtfbbq)
    options.autoBracket = settingList
    options.shootingMethod = .bracket

    try await thetaRepository?.setOptions(options: options)
    
    let shotCountSpecifiedIntervalCapture: ShotCountSpecifiedIntervalCapture = try await withCheckedThrowingContinuation { continuation in
        thetaRepository!
            // .getPhotoCaptureBuilder()
            .getShotCountSpecifiedIntervalCaptureBuilder(shotCount: 3)
            .build { capture, error in
                if let photoCapture = capture {
                    continuation.resume(returning: photoCapture)
                }
                if let thetaError = error {
                    continuation.resume(throwing: thetaError)
                }
            }
    }
    class Callback: ShotCountSpecifiedIntervalCaptureStartCaptureCallback {
        let callback: (_ url: [String]?, _ error: Error?) -> Void
        
        init(_ callback: @escaping (_ url: [String]?, _ error: Error?) -> Void) {
            self.callback = callback
        }
        
        func onCaptureCompleted(fileUrls: [String]?) {
            print("COMPLETED urls \(fileUrls)")
            callback(fileUrls, nil)
        }
        
        func onCaptureFailed(exception: ThetaRepository.ThetaRepositoryException) {
            callback(nil, exception.asError())
        }
        
        func onStopFailed(exception: ThetaRepository.ThetaRepositoryException) {
            print("ON STOP FAILED")
        }

        func onProgress(completion oop: Float) {
            print("PROGRESS \(oop)")
        }
    }
    
    let photoUrl: [String]? = try await withCheckedThrowingContinuation { continuation in
        shotCountSpecifiedIntervalCapture.startCapture(
            callback: Callback { fileUrls, error in
                if let thetaError = error {
                    print("ERRORING")
                    continuation.resume(throwing: thetaError)
                } else {
                    print("RESUMING with file urls")
                    continuation.resume(returning: fileUrls)
                }
            }
        )
    }

    // eventually exfiltrate the photos.
    // callback(photoUrl)
}

Flutter demo release build - can't initialize

The apk built with flutter build apk can't initialize the connection to the camera, gets "initialize error" - I'm using demo-flutter with no changes. Google Pixel 4 running Android 13. With THETA X. Firmware 2.10.1.

This works in debug with no problem. I only have the problem when I build for release and distribution.

Screenshot_20230622-160936

Screenshot_20230622-160949

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.