How to use JavaScriptCore in React Native android apps - react-native

We are building a React Native application on Android. We have a requirement of creating a separate JSC virtual machine instance in a thread. We do not want to use same JSC context which is used by React Native.
We have searched a lot on web and also tried to figure out how React Native is using JSC, but we are not able to find the same.
It will be very helpful if anyone can suggest us directions for the same.

Perhaps you should take a look at this:
ericwlange/AndroidJSCore
or dive deep into React Native's Android source code.
https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/jni/react/JSCExecutor.cpp

Related

Add unity into React native expo

I would like to add unity into my react native expo app. Since I searched I don't find anything helpful for me and related to my requirement. Is there any Sample/Reference code available for Unity Integration with React native?
Thanks in advance!
ive been in the same place. so currently theres no way to directly communicate it with Unity. But you can always communicate with native android/ios and that in turn communicates with unity. worked with that, and it works pretty well. so your native side should launch the game rather than react native directly starting it.
Basically call a native method in android side from react native --> that in turn starts / calls the unity module .
check this once
Hope this helps. otherwise please connect with me

Can react-native share codebase with Proton native?

I'm working on the mobile app with react native, and going to start on the desktop version. Im considering proton native because it uses the same syntax as react native does, and its size and starting duration are way much better than Electron.
Im wondering if proton native and react native can share the same codebase, since they both using the same syntax?
I have the same problem in my project.
In my mind, you can share react-native project sources to proton-native.
We just need to stick together :)

Can I use components of a web app with a React Native app

I am trying to build an app in react native. The app was originally built in unity, but due to performance reasons. It was decided the app should be rebuilt in react native. The app currently has a web app also and I am wondering if there is a way when that the react native app can use some components from the web app.
I tried to google this problem, but I only find articles about using components between react native and react native web. I do not know what the web app was built with, but I am almost certain that it was not react native web.
What component are you trying to use?
Because if it's a pure unity I think there are some libraries who are not available on a mobile device, so you can't use it.
I have in mid some C++ libraries or third part one to use the sound.

React Native - Using iOS and Android SDKs

I just started using React Native a few days ago and want to build my next iOS/Android app with it. However, I had a question (and I apologize in advance if this question is very basic).
If I am integrating my iOS and Android apps built with React Native, with an external service (like Salesforce for example), how do I go about using the native mobile SDKs they provide for iOS and Android? As in, what do I do to integrate those SDKs into my React Native app? Those SDKs are using native Objective-C and Java code, so how would I be able to use the JS code for React Native? I believe my understanding about this is skewed.
I looked at this link which goes into it, but it seemed very confusing and I had a bit of a hard time grasping the concept (again, I am very new to this - I've done a lot of web development, hence turning my attention to React Native, but I've done no mobile development whatsoever).
If someone could please explain how that works, and point me in the right direction where I can read and learn more, I would sincerely appreciate that!
Thank you!
Checkout out this talk on SalesForce mobile SDK for React native
Official SalesForce Docs - Read Here
Also this tutorial might help you. http://rajaraodv.github.io/salesforce-react-native-tutorial/
Update:
There are react native packages build by open react native community if you couldn't find anything to access native iOS or android functionality you will have to write react native wrapper yourself using react native "Native Modules"
Native Modules

Connecting maps into react-native app

I have some API of maps (2GIS). Maps on JS. How can I connect them to my app on react-native?
I tried to find some possible ways, but without result. I am a newbie on react-native
If you want to use a native component that nobody wrote a React Native component for, you will to do it yourself.
It's not very hard for most things. You can learn how to do it for iOS and Android in the linked docs.