Questions tagged [native-module]

105 questions
2
votes
1 answer

React Native: running JS code from Java Module in background with AlarmManager

I'm looking for some way to execute JS code from Java Native Module. I found solution with Timer, but it use Callbacks and it works only when app is in background (React-native background process(android) handling?). I'm using AlarmManager to wake…
jonzee
  • 1,600
  • 12
  • 20
2
votes
0 answers

React Native: Custom NativeModule for Android is undefined in Javascript land...?

via the docs: https://facebook.github.io/react-native/docs/native-modules-android.html Upon calling the method to access and thus use the NativeModule, it is not found... 'use strict'; import {NativeModules, DeviceEventEmitter} from…
studiobrain
  • 1,135
  • 2
  • 13
  • 35
1
vote
0 answers

How to specify a prop in a swift component for react native?

How can I implement a feature in my code where I can pass a video URL as a prop to the TweetView component in React Native, and have my Swift code using UIKit display that video, instead of manually specifying the video URL in the Swift code for…
James
  • 73
  • 6
1
vote
0 answers

React Native : NativeModules.ReactToNative is returning null

I am trying to access the ReactToNative method from NativeModules in React Native but its returning null. Also I have imported the NativeModules Library from react. import {Linking, NativeModules} from…
1
vote
0 answers

Method addObserver must be called on the main thread Kotlin

When I create a native module on Android using Kotline getting error Method addObserver must be called on the main thread enter image description here
1
vote
0 answers

React Native - Native module vs JS performance

We have need for faster price calculations in our app. Currently we iterate over product items in JS and calculate each product item’s price. I was thinking maybe native modules could be used for faster speeds. But it doesn’t seem like it? When I…
Jesper Johansson
  • 599
  • 3
  • 14
1
vote
0 answers

How to integrate aar library to native module in React Native?

I need to integrate aar library to my native module. So, I created structure of the package by create-react-native-module, then I created new folder libs and added implementation fileTree(dir: "libs", include: ["*.aar"]) to build.gradle in my…
1
vote
0 answers

react native how to import and use pure android sdk in react native project

I wanted to print receipt from react native app my problem is the device is smart pos so i have this documentation it is explain how to user their SDK in pure android…
1
vote
0 answers

Cmake Boost library linking error LNK1104: cannot open file 'libboost_random-vc142-mt-x64-1_74.lib'

I am trying to make node.js native addon which use cmake to compile c++ code... CMakeLists.txt file cmake_minimum_required(VERSION 3.15) # Name of the project (will be the name of the plugin) project (addon) set(CMAKE_CXX_STANDARD 11) # Don't add…
AtiqGauri
  • 1,483
  • 13
  • 26
1
vote
0 answers

How to disconnect from a WiFi and connect to a wifi whose SSID and password is available?

I am trying to disconnect from a WiFi and connect to a different wifi which is in access mode and I have to connect to it in order to configure the properties. Is there anyway I can do this? I found a medium article…
1
vote
0 answers

Native module cannot be null - react-native-purchase

I am going to lose my mind over this soon, but here it goes :-) I am wanting to use RevenueCat/react-native-purchases in my project, but as soon as I import import Purchases from 'react-native-purchases'; I get the message "Native module cannot be…
jwknz
  • 6,598
  • 16
  • 72
  • 115
1
vote
0 answers

Memory leak when using Node.JS native modules

At my job we have a lot of C++ code that is callable from Node.JS through native extensions. Many of the created objects contain pointers to large amounts of memory (for example, pointcloud data from a 3D-camera points to a buffer that's over a…
Theemuts
  • 568
  • 1
  • 7
  • 13
1
vote
1 answer

Does localStorage get reset when I recompile native modules?

I recently had to update a native module in my electron project. Just to be sure to have a clean installation I first removed all node_modules and reinstalled them via npm install. Then I rebuilt my native module via electron-rebuild After starting…
stoefln
  • 14,498
  • 18
  • 79
  • 138
1
vote
1 answer

Nodejs - libuv non-blocking event callback

I am trying to build an application using Node.Js which requires the native module support. I have used libuv library through the application and I was able to make most of the async methods work except for the part where I had to implement the…
Ganesh Rathinavel
  • 1,243
  • 4
  • 17
  • 38
1
vote
1 answer

ReactNative javascript bundle build with wrong version in dev environment

I have a react native application that was developed with RN 0.49.5. I had to upgrade it to the latest react-native version (now 0.59.5). Though I have a problem when running it in development mode. Funny thing is that if I build it for release (cd…
500 Server error
  • 644
  • 13
  • 28