Questions tagged [react-native-native-module]
137 questions
0
votes
0 answers
React Native Android "Got Unknown Argument Class: JsListener"
I have a React Native App where I am trying to use NativeModules. I wrote a custom class to be used to declare a custom argument type but not sure if I am doing it right. I am new to Java. Here is my MainActivity.java file.
private class JsListener…

Matt Croak
- 2,788
- 2
- 17
- 35
0
votes
0 answers
Adding a native module in React Native 0.71 causes crash, with error code `EXC_BAD_ACCESS code=2`
I recently upgraded my React Native project to 0.71 (I used 0.68 before)
And now my project crashes immediately after some native modules are invoked, and Xcode says:
com.facebook.react.JavaScript (7): EXC_BAD_ACCESS (code=2, address=0x(every time…

Jihoo Byeon
- 69
- 1
- 8
0
votes
0 answers
How to get intrinsic camera parameters in cameraX android
As part of a react native module i had to get the LENS_INTRINSIC_CALIBRATION data from the camera2 api in a camerax fragment
after trying many things i found the easiest way to do it is with the Camera2Interop camera2 library, which provides access…

Phys3
- 1
0
votes
0 answers
Unable to import native (Swift) iOS view into React Native project - requireNativeComponent was not found in the UIManager
Preface: this error message with requireNativeComponent appears often on StackOverflow, mostly resolved with the suggestions such as disintegrating the pods, and then performing a new pod install and recompiling.
Unfortunately this has not worked…

daspianist
- 5,336
- 8
- 50
- 94
0
votes
0 answers
Native module: render react childs in custom view on Android
I need render react childs in custom view on my native module. I did it in iOS and want to know how to do it in Android.
In iOS i simple created UIView and overridden method didUpdateReactSubviews in my RCTView:
+-----------------------+
| RCTView …

posix
- 101
0
votes
1 answer
React Native Error: java.lang.IllegalArgumentException: Could not convert class dev.thanhad.audioplayers.PlayerMode
I'm creating native module for my project. I use npx create-react-native-library, type of library is Native Module and languages is Kotlin & Objective-C.
I add an enum class, add it to getConstants() and run example project it throw error…

TAD
- 1
0
votes
1 answer
AVCaptureDevice isTorchActive does not work for React Native
I've tried to write my own module to detect is torch turned on/off.
According to documentation I've tried to run KVC as below
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void…

Jaroslaw K.
- 5,224
- 2
- 39
- 65
0
votes
0 answers
Objects passed to React Native via native module callback parameters in Swift are null
I am successfully calling a JavaScript callback in a Swift native module in React Native. I need to pass data from the Native side back to React Native, but when the data is anything other than strings or numbers, the data parameter in the callback…

Mr. Robot
- 1,334
- 6
- 27
- 79
0
votes
1 answer
Is anybody pass Uint8Array to native module in React Native. I haveError Malformed calls from JS
I try to pass ByteArray to Java Wrapper of my native module, but get error:
Error: Exception in HostFunction: Malformed calls from JS: field sizes are…
0
votes
1 answer
React Native: save a value send to a Native Module on AppDelegate
I'm building a Native Module in Swift for a RN app where I "remove" the RN view and load a Storyboard, everything works fine but I need to send a value from RN to this Module but it is not being saved, I think it's because the controller is loaded…

Anderson Vanzo
- 88
- 10
0
votes
0 answers
Importing NativeModules from react-native on Android
I'm trying to import some native modules in my application.
In index.js I'm trying to do:
import { AppRegistry, NativeModules } from 'react-native';
The, I want to use my my module:
const { NetworkListenerModule } = NativeModules;
However,…

Keselme
- 3,779
- 7
- 36
- 68
0
votes
0 answers
Create React Native module which Works on both Expo and Natively
So basically, the title says it all. I want to create a React Native Module(Library) which can be used in Expo Projects or Native ones.
Is this possible?

Ryuga Law
- 160
- 7
0
votes
0 answers
react native kiosk mode listen to unpinning from device buttons
I want to implement kiosk mode on react native (android). I have implemented the functionality to pin/unpin application and check if lock task mode is active using activityManager.getLockTaskModeState, startLockTask & stopLockTask.
The problem is i…

tommyg93
- 1
- 1
0
votes
1 answer
How to call a Link a Native Android Module Library in React Native
I've been tring to use an Android Library Module but my React Native project fails building whenever I add it as a dependancy :
build.gradle
dependencies {
. . .
implementation project(path: ':TestLibrary')
. . . .
}
The Native Class…

Program-Me-Rev
- 6,184
- 18
- 58
- 142
0
votes
1 answer
Installing Notifee with Expo: Error: Notifee native module not found
I'm trying to install Notifee with Expo by using the steps on the installation page: expo install @notifee/react-native and followed by adding "@notifee/react-native" to my plugins in my app.json file then running expo prebuild but I'm still getting…

Carson
- 13
- 4