Questions tagged [native-module]
105 questions
12
votes
1 answer
Do we need to run `pod install` with React Native 0.60?
I'm using React Native 0.60.5 and am linking this module. It says that for React Native 0.60+, "CLI autolink feature links the module while building the app", so all we need to run is yarn add @react-native-community/async-storage.
However, on the…

gkeenley
- 6,088
- 8
- 54
- 129
10
votes
3 answers
React native Wifi list
Is there a way to scan and all get Wifi list using react native for Android and iOS. I have seen a few libraries but mostly for android and even those doesnt work properly. Any suggestions?
If I need to write Native Modules can you point me to…

Vinay
- 361
- 1
- 4
- 11
10
votes
3 answers
React Native Get battery status / level Using Native Modules
I am writing a react native app to get IOS and Android Battery status. I search through the net and found few libraries which can get battery level of the phone.
https://github.com/robinpowered/react-native-device-battery…

Sameera Chathuranga
- 3,638
- 3
- 27
- 48
9
votes
1 answer
React Native: How to invoke native Android layout from module?
Regarding this question, I've been trying to get this done via native modules in Android.
I've declared my Module at .../java/com/myproject/multiplecamerastream following the example at React Native ToastModule (functionality here is not…

Unapedra
- 2,043
- 4
- 25
- 42
8
votes
3 answers
Native module in React Native: function returns "undefined"
So, I am practicing making native modules in Java that can have functions exposed to the JavaScript code of React Native. For that, I decided to go for a simple demo math library. My code is as follows.
MathOpsModule.java
package…

Debadeep Sen
- 435
- 7
- 18
7
votes
2 answers
I can't see any iOS Native Module in JS
I have some experience with React but I'm new to React Native.
I've played around for a while, but I got stuck when I tried to write a basic native module for iOS. I've tried with both Swift and Objective C. (I have some basic experience with Swift,…

charlietango
- 428
- 2
- 11
7
votes
1 answer
Call JavaScript function from native code
I have a react-native app and want to integrate it with native SDK. At some point I need to call js function which will return me data, and this call I should make from native side. Here is the flow:
some iOS handler require more info
native layer…

Alexei Malashkevich
- 1,575
- 1
- 17
- 34
7
votes
2 answers
"undefined is not a function" when create android native module in ReactNative
I'm following ReactNative Native Module Guide to write the java class that can be used in JS side. The exported method is show from class ToastModule(exported as ToastAndroid). The show method is below:
public void show(String message, int duration)…

Johnson
- 491
- 1
- 3
- 13
6
votes
2 answers
How to resolve a NativeModule.RNLocalize is null error in test?
I'm using the package react-native-localize to provide localization in an app. I've already linked the library and it works fine running on a device.
Issue:
When I test a component that imports react-native-localize. I get the error…

Brian Var
- 6,029
- 25
- 114
- 212
6
votes
1 answer
Catch c++ native addon cout/console messages in electron.js or node.js app
C++ native module's std::cout console message don't get printed on console once module gets build.
Is there any way to print runtime std::cout messages on console AND then we can catch those messages in electron app using node.js
How does…

AtiqGauri
- 1,483
- 13
- 26
6
votes
5 answers
typeError: null is not an object while accessing the Native Module
I am working on one React Native Application and trying to access the Native Module from the android. I am following this official documentation
enter link description here
After creating the Native Module, when I try to access it in the javaScript…

Mudasir Sharif
- 733
- 2
- 15
- 31
6
votes
1 answer
React-Native: Error trying to get in touch with native module in the tutorial
Having issue with defining a native module from the tutorial in https://facebook.github.io/react-native/docs/native-modules-ios.html.
#import "CalendarManager.h"
#import
@implementation…

LittleFunny
- 8,155
- 15
- 87
- 198
5
votes
2 answers
How do I return an array from a Java module in a React Native Component?
I'm writing this to answer my own question because the docs don't explicitly state this and I couldn't find it on stack overflow or anywhere else. Here is how to return a String array from a Java module back into a React Native Component (simplified…

S. Pan
- 619
- 7
- 13
5
votes
1 answer
How to use RCTConvert in react
I am new to react and working on react bridging modules. I just want to know that how the RCTConvert is useful and how can use that. I am following this site
link
Please, anyone helps me to know about this stuff.

Ramakrishna
- 712
- 8
- 26
4
votes
2 answers
What are 'tools for native modules'? Help a newbie decide if they are necessary (NodeJS installation)
I have just started my NodeJS course, the lecture was recorded at the time of NodeJS version 10 (on a mac). I'm on Windows, it is now version 16. The lecture does not contain this page of the installation screen:
Summary: I do not know if I want…

Codewell
- 51
- 1
- 3