I want an Android proof-of-concept app using React Native that can communicate with a C++ program.
Let's say my C++ program takes a string from the standard inputs and append "1234" to the standard outputs. I want you to show me how an Android Reactive App app can communicate with this C++ program.
The app will need to spawn a new child process and send/receive messages from/to the child process. This is known as inter-process communication.
You will need to make a button. When I click it, the app will send "Hello World" to the child process. The process will then append "1234" to the string, and thus it'll return "HelloWorld1234". Show the output "HelloWorld1234" in a text box.
The purpose of the task is to prove IPC works with React Native on Android. This app is not intended to push to the app store.
- All process communications must be done by standard inputs and standard outputs
- There is no need for any UI optimisation. Nothing. You just need to show me the code how IPC works in React Native.
- The delivery will be the ReactNative source code that works on Android simulator and the C++ code as I will build it and run the code myself.