react-native-node | Run a separate Node.js process behind a React Native app | Runtime Evironment library
kandi X-RAY | react-native-node Summary
kandi X-RAY | react-native-node Summary
DEPRECATED. Please use Node.js Mobile by Janea Systems instead. It has the same purpose as this library, but is more updated, and supports iOS. This library still works as documented, but I'm not committed to maintaining it anymore. Using this package you can: run http servers in Android, use Node streams, interface with the filesystem, off load some heavy processing out of the JS thread in React Native, and more! Running the real Node.js in Android, you can do everything that Node.js on desktop can.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Called when the background app is created
- Prepares the bundle
- Prepares the node to load
- Untar the input file
- Stop the node
- Kills the node
- Stops the node
- Start the RNNodeService
- Converts the given Array to an ArrayList of Strings
- Start command
- Starts an RNNode thread
- Starts the node
- Stops the RNNodeService
- Create native modules
- On - load
- Create view managers
react-native-node Key Features
react-native-node Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-node
QUESTION
I'm using React Native to display a live stream from RTMP server - and it works great using NodePlayerVideo component from react-native-nodemediaclient.
However, I also need to save that same stream to a local file on the device. How can I do it?
My idea is to use react-native-ffmpeg but it doesn't work.
What is the right ffmpeg command to use? What is the recommended solution?
...ANSWER
Answered 2020-Apr-03 at 19:47The short answer - as the documentation instruct.
Unfortunately, I discovered that the problem was with the file system setup and not with FFMPEG library. Specifically, for Android I had to use RNFS.ExternalDirectoryPath
and not RNFS.CachesDirectoryPath
or RNFS.ExternalCachesDirectoryPath
.
QUESTION
There are a bunch of old SO threads dealing with running NodeJS on Android. Most of these are no longer viable (JXCore) and/or provide confusing, outdated, incomplete, or erroneous information.
Therefore I have investigated what seems to be currently (as of August 2017) viable approaches and found three likely candidates.
To decide between them I would like to know:
- the primary differences between these approaches
- specific pro's and con's on each approach
- likely hurdles, challenges and shortcomings
- do you know of other viable alternatives?
Viable approaches are:
- Running V8 javascript engine which includes NodeJS (J2V8)
- Use NodeJS directly, embedded as native library (node-on-android)
- Combining React Native with NodeJS app-as-a-service (react-native-node)
Besides that I have found a number of related interesting resources:
- NPM install NodeJS directly using Termux without rooting (not for end-users)
- LiquidCore - native mobile micro-app devenv (not investigated, interesting concepts)
- dna2oslab - has a working NodeJS build script for node executables
- Building NodeJS for Android - blog with useful compilation tips and example project
ANSWER
Answered 2017-Aug-03 at 05:30I received an answer from @dna2github, the creator of NodeBase (thanks a lot!) that I'll include here (with permission):
Hi,
Thx for your question. I will do a brief answer in my view.
1. Running V8 javascript engine on android which includes NodeJSpros:
- integrated with Java world; can get full control of code.
cons:
- a little hard to integrate with 3rd packages (need time to learn how).
- need to learn about NodeJS and V8 things and also J2V8 docs (it consume long time).
pros:
- focus on js dev and no need to consider android side.
- less learning time; similar to Cordova phonegap ....
cons:
- js app => apk is a black box.
pros:
- flexible
cons:
- no gui
Not familar with LiquidCore; build micro service especially from url, I think, is to resolve no direct available storage on iOS. react-native-node the Android part is based on NodeBase method and use the prebuilt binary.
For NodeBase:
pros:
- similar to 3; difference is that it has its own gui to start/stop app.
- it can be a template for everything; for example, if would like to run django, you just need to replace node to python; rails, ruby...
cons:
- native process access problem; the process cannot inherit access from Android app.
- happy toy happy open source not like a commercial app; need more design if want to distribute to customers
At first, I run node in terminal; I find only dev can easily to use it to start js app. My friends and families also wanna some tools for example make water mark on picture in batch. NodeBase is created for them to easy to start/stop app. Then they just need to open browser to use it. My another idea to create NodeBase is that we can build sharable applications that can be shared in the same Wi-Fi. When host starts an app, it can be visited by near people. Then they can work and play together. For example, we play werewolf and when there is no judge, we will start the werewolf app to have a judge for the first round. We can also share files between devices via download/upload.
For me, I can build what I want flexibly for example, I would like to make my Android as a machine learning runner; it can help me run machine learning programs at anytime (with node and python, thus in my another repo: dna2oslab is focus on building binaries) to make use of phone running time.
For you, if wanna port your app in a short time, I recommend 2; if you have time and other resources, 1 is better. 3 if you just make a toy/demo. 4 other is always possible and just do your imagination to create works.
Best wishes, Seven
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-node
You can use react-native-node like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the react-native-node component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page