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
Questions tagged [react-native-bridge]
43 questions
1
vote
1 answer
How to fix java.lang.string cannot be cast to com.facebook.react.bridge.readableArray?
I was creating a native Image component in the Android and here is some code that I used.
ViewManager.java
// setting the source of the ImageView
@ReactProp(name = "src")
public void setSrc(ReactImageView view, @Nullable ReadableArray sources) {
…

AMAL MOHAN N
- 1,416
- 2
- 14
- 26
1
vote
1 answer
React Native IOS Bridge Native View - proper way to call Native Method from JS side
I want to discuss the options i have come across for calling a native method from a IOS ViewManager/View in JS side without using properties but direct method calls.
Option A:
implementing a method in the ViewManager which searches for the correct…

Steytz
- 324
- 1
- 3
- 11
1
vote
0 answers
How to provide react application context to an android activity?
I am trying to set up android app link for my app. The problem is that the intent is received by an activity and I need to send this event to my javascript code(to navigate to the correct screen) through RCTDeviceEventEmitter but for this to happen…

Pro
- 445
- 4
- 14
1
vote
0 answers
How can I create an android app link for my react native application?
I have set up an android app link for my react native application...But
whenever I tap the link and choose my application to open it, system does try to open my app but my app crashes...I have set up the android linking properly and the activity…

Pro
- 445
- 4
- 14
1
vote
2 answers
How to use command line tool like gif2webp in react native?
I want to convert gif to webp file in my react native app to send it to other app for further process. After trying many ways I found that this gif2webp command line can do the job and I can convert the gif to webp using cmd in windwos but do not…

CrackerKSR
- 1,380
- 1
- 11
- 29
1
vote
0 answers
React Native - Best way to send and receive events within Javascript thread
I want to know which is the best way to send and receive events only within the JS stack. The event which is being emitted should not reach the react-native bridge or simply I don't want the event to reach the android/iOS stack.
I know using…

Manish Waran
- 90
- 10
1
vote
1 answer
Can pods access frameworks in main project?
there is an SDK developed for Native iOS. I'm trying to create a React Native bridge for this SDK. My goal is to be able to establish the bridge without breaking the native ios integration. Can I access the .framework extension SDK in the main…

Göksel Pırnal
- 98
- 1
- 6
1
vote
1 answer
How to pass data from Java Activity to react native?
I am unable to pass data from java activity to react native.
I am processing a card payment, and when the payment is done, the response is stored in a variable called message. I need to pass this message to my react native code.
// Java module, the…

biggest_boy
- 381
- 4
- 23
1
vote
1 answer
React Native capture events from physical barcode scanner
I'm trying to implement a barcode scanner (this model is a Generalscan M100BT) inside a React Native application. Currently works ok for scanning into a TextiInput, but the soft keyboard is on the way and theres no way to hide it. So we are trying…

Dieguinho
- 758
- 2
- 14
- 31
1
vote
2 answers
How can I send https request with .p12 certificate on Objective-C or Swift
I have a react-native project and I have to create Native module for https request with .p12 certification but I never use Objective-C (it's a little complicated) or Swift
I found a class for https request with certification it is but I didn't use…

errorau
- 2,121
- 1
- 14
- 38
1
vote
1 answer
React Native bridge: send data continuously from native to JS?
I have read a bunch of resources online but didn't see any similar use case. I need to send data from native (Android) to JS continuously, with the data being small sized string.
Would this (from RN…

HeyThere
- 503
- 1
- 5
- 19
0
votes
0 answers
ReactNative Bridge - send events from native to JS - Kotlin
I'm going through the official React Native documentation to create native modules. I'm currently at the section to send events from native to js. I'm probably missing something but I ended up with:
package com.myapp
import android.util.Log
import…

MarPor
- 1
- 1
0
votes
0 answers
Enable Fabric in react-native 0.71 using ReactFragment in android
I am currently having a usecase where I need to start my react-native component using ReactFragment using following syntax
val reactNativeFragment: Fragment = ReactFragment.Builder()
.setComponentName("ComponentName")
…

Manish Patiyal
- 4,427
- 5
- 21
- 35
0
votes
0 answers
E/Camera2CameraImpl: Unable to configure camera 0, timeout! While React Native using Android Native camera
I have implemented React Native bridging using a manager and module class in Ktolin. I am trying to access the native Android camera from React Native.
While trying to access the Android camera, I am facing a timeout issue.
*E/Camera2CameraImpl:…

Arun Kumar
- 1
- 3
0
votes
1 answer
Fabric Native Component throwing error in build folder PackageList.java file error: cannot find symbol import com.rtncenteredtext.CenteredTextPackage;
I have tried fabric native components as given in https://reactnative.dev/docs/next/the-new-architecture/pillars-fabric-components?fabric-component-specs=flow&android-language=kotlin for android. And it is throwing error…

Dwipal Parmar
- 244
- 2
- 8