I have a use case where i am receiving some data in android code(native). I want to insert this data into the same realm which is opened or made by my react code. 

Or write in the same realm. How can I achieve this? All the help is appreciated.
P.S. I know I can somehow make a native module and send data back to my JS and perform operations there.. but I am not sure it will happen if my app is not in foreground.

Right now I am running a service in background which will receive data and save it in realm.

Any way I can do this ??