Is Worklets Library Supporting Calling React Module From Android Native Java Code? #8728
Unanswered
seito-simonng
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Hi @seito-simonng, could you elaborate on your use-case? If you're asking if it's possible to use React Native TurboModules in a multi-threaded way - unfortunately no. For the time being and by design they can be called only on the RN Runtime (JS Thread). If you want to call your custom JavaScript bindings, linking via JNI to native Android functions, then yes, you can do it with Worklets although we don't provide any explicit APIs for that as this is a very advanced application. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking for multithreading library, that worklets seem only way to achieve this goal.
But i has been study worklets about 2 weeks to implementing Worklets thread running Android Native Java Code.
For my situation is i am developing a RN Apps, that required continues polling the hardware by Android SDK only and the communication between RN Apps and Hardware may required few seconds process time. As RN Apps is single thread architecture. When polling from the hardware would have a noticeable delay from the UI and i would have a chance polling more than 1 hardware.
Is the Worklets able to do this? And i has been asking AI and study from the internet for Worklets work on Android Native Java Code.
Is any one can help? Thank you so much.
Beta Was this translation helpful? Give feedback.
All reactions