Questions tagged [react-native-bridge]

The React Native Bridge allows the native code and the javascript code to talk to each other. Without the bridge, there is no way for the native code to send any information to the JavaScript code and vice versa

43 questions
12
votes
1 answer

What's the difference between bridging a module with C++ or with JSI in React Native?

In React Native it is possible to bring native functionality from Android and iOS in multiple ways. I always thought that all possible ways were limited by platform-related languages like Java/Kotlin and Objective-C/Swift. However, I noticed that it…
8
votes
2 answers

How to put array on WritableMap object in ReactNative bridge

To communicate with Android to ReactNative I use RCTEventEmitter. Using this I need parse array to RN side and this array should set on WritableMap object. On WritableMap object can put Array as shown below, void putArray(@NonNull String key,…
4
votes
2 answers

DevSettings.reload() for logout in React Native

The Problem I am migrating the logout functionality of my hybrid app from native to react native. Requirements: It works in production and on a device It navigates to the root screen of the app (login screen) It clears the redux store [nice to…
Tai
  • 490
  • 4
  • 18
4
votes
3 answers

pass an arraylist of custom objects to react native side from android

I have a list of custom objects (List) . I need to send this data to React Native side to display in flat list . How do i do this ?This list is present in class NativeToReact(reactContext: ReactApplicationContext,userManager: IUserManager) :…
Preethi
  • 2,112
  • 7
  • 38
  • 54
3
votes
0 answers

React native invoke functions from Swift

Our app needs to do integration with IOT devices and we get the NFC driver framework from device manufacturer. But the lib and APIs from the framework is in Swift. I was able to follow this tutorial to invoke bridge at objective-c level, but I have…
user3453552
  • 199
  • 1
  • 2
  • 11
3
votes
0 answers

Expecting response when Native code (Java) calls Javascript code in ReactNative

Disclaimer: because this question pertains to my work stuff, I cannot get into the actual details. I will try to provide as much information as possible about the issue. Also, I am new to ReactNative. Just started using it since a week and I might…
Some guy
  • 1,210
  • 1
  • 17
  • 39
3
votes
1 answer

Exception: addEvent is not a recognised Objective C method

I'm porting swift class to ReactNative. my CalendarManager.Swift class CalendarManager.Swift import Foundation; import UIKit; // CalendarManager.swift @objc(CalendarManager) class CalendarManager: NSObject { @objc func addEvent(_name:…
Kartiikeya
  • 2,358
  • 7
  • 33
  • 68
2
votes
1 answer

saving Screenshot to Pictures Directory not working in the foreground Service in Java

I have a React Native project. this app should captures the user screen and activities in the foreground. React Native cannot do this thing so I used Native Modules to write java. I made two java file which are ScreenCaptureModule.java and…
2
votes
1 answer

How to build React Native Bridge for UWP Library

I have a UWP c# library , which I am trying to use from react native windows app. There are plenty of examples for creating a bridge to communicate between react native and ios or android native library. But I am not able to find any document or…
Noorul
  • 873
  • 2
  • 9
  • 26
2
votes
0 answers

react-native bridge for location permission prompts twice

I am using react-native 0.59, then updated the API to 29. Changing 29, the 'Allow all the time' was removed in the option list upon requesting for location permission. Then, I created a bridge for the location permission. Because some articles,…
Riku
  • 652
  • 1
  • 9
  • 24
2
votes
0 answers

Android Native Module: How to go back to React Native from native Android Activity?

I implemented android native bridge module in which I call native SampleActivity from React Native. Intent intent = new Intent(context, SampleActivity.class); context.startActivity(intent); By pressing the physical back button or calling…
Sanjay
  • 53
  • 6
2
votes
0 answers

Android fragment view on react native page not showing up

I'm trying to render an Android Fragment on react native page using react native bridge. As soon as I try to replace the react native view with the android fragment, it shows a complete blank view. I used Layout Inspector and found out that the…
2
votes
0 answers

What is React native's "JSTimers.callTimers"?

I'm debugging the react-native bridge to see conversations between native & JS side. As I can see so many messages were sent via the bridge even I didn't touch anything, it's a non-stop conversation. method: "callTimers" module: "JSTimers" type:…
Neo.Mxn0
  • 953
  • 2
  • 8
  • 25
2
votes
0 answers

Migrate Android webview to React-Native-Webview

I have a Hybrid Android App which uses Android WebView for rendering the Web Pages. I have Wiziwig Editor (which is written in HTML, javascript, and css). I am using Webkit Interface for communicating between Java and JavaScript I want to…
1
vote
0 answers

Emit event from other class than native module class from android to react-native

i have CameraModule.kt which is android native module and CameraHomeFragment in a react-native app. And i need to send some data from the fragment to react-native CameraModule.kt : class CameraModule(reactContext: ReactApplicationContext):…
1
2 3