0f7ee51333
* Try to log to console via runOnJS * Call `console.log` * Create custom `VisionCameraScheduler` * Fix scheduler call * Call with this * Fix console setting * Move J---- to `java-bindings` * c++ style * Android: 1/2 Create custom Scheduler * Android: 2/2 Use custom Scheduler * Don't use `runOnJS`, use `__callAsync` directly
27 lines
563 B
Objective-C
27 lines
563 B
Objective-C
//
|
|
// VisionCameraScheduler.h
|
|
// VisionCamera
|
|
//
|
|
// Created by Marc Rousavy on 23.07.21.
|
|
// Copyright © 2021 mrousavy. All rights reserved.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#import <RNReanimated/Scheduler.h>
|
|
#import <React-callinvoker/ReactCommon/CallInvoker.h>
|
|
|
|
namespace vision {
|
|
|
|
using namespace facebook;
|
|
|
|
class VisionCameraScheduler : public reanimated::Scheduler {
|
|
public:
|
|
VisionCameraScheduler(std::shared_ptr<react::CallInvoker> jsInvoker);
|
|
virtual ~VisionCameraScheduler();
|
|
|
|
void scheduleOnUI(std::function<void()> job) override;
|
|
};
|
|
|
|
} // namespace vision
|