Questions tagged [react-native-native-module]

137 questions
1
vote
0 answers

react-native: How to access react-native libraries from JS view displayed inside an android native module

I have created a react-native application, which on a button press will load an Android Native Module. When called, the native module will start an Android activity which makes use of the Presentation class (along with…
1
vote
2 answers

run android background task in react-native

I want to create an ability in my react-native android app to send my user geolocation to the server for each period of time, even if he closed the app! so probably it means i have to run some thing like a task for run on Os(android) from a…
Iman Salehi
  • 908
  • 2
  • 14
  • 34
1
vote
0 answers

ReactNative NativeComponents is an empty Object

I am currently trying to import ReactNativeHeading into a Hello World Viro App for android and after following these instructions, all I get is undefined. The following code can be run in both App.js and…
1
vote
3 answers

how to Send object/string from android Activity onActivityResult to react native

In my react native project ,I have implemented payment native sdk in android (that does not supported in react native).so i am tried to call native sdk with native modules.. i am able calling the payment SDKUI from react native native module ,but…
1
vote
1 answer

Troubleshooting an iOS Native module loading issue with react native

I'm trying to make sense of an iOS native module whose code is generated by djinni. According to the React Native doc, you must include the RCT_EXPORT_MODULE() macro in your code. This working sample does not. Later in the documentation it is said…
anon
1
vote
3 answers

class must either be declared abstract or implement abstract method called createJSModules in ReactPackage

I am following Native Module documentation for android: https://facebook.github.io/react-native/docs/native-modules-android.html#docsNav My package currently looks like this package com.myCompany.asqgooglesignin; import…
Ilja
  • 44,142
  • 92
  • 275
  • 498
1
vote
0 answers

How to handling asynchronous in Service to execute task synchronous in Android?

My Question is not duplicated as this question! my case is about AsyncTask not just about Runnable, and even so, I've 2 AsyncTask inside runnable that needed to handling! I'm new in Android, I've an app created by React Native. but the problem…
flix
  • 1,688
  • 3
  • 34
  • 64
1
vote
1 answer

Event when all the initial props of a react-native Native UI Component have successfully loaded?

I'm building a react-native native UI component: - (UIView *)view { return [[MyComponent alloc] initWithBridge:self.bridge]; } and I'm exposing props like this: RCT_EXPORT_VIEW_PROPERTY(prop1, NSDictionary) RCT_EXPORT_VIEW_PROPERTY(prop2,…
0
votes
0 answers

How to make a new ReactRootView within an Expo native module?

I'm new to react-native and right now I'm trying to make a new react-native app using the Expo framework. As part of my app, I want to show a bar that displays over the screen even when my app is not active. (I know that display overlays are only…
takanuva15
  • 1,286
  • 1
  • 15
  • 27
0
votes
1 answer

Resize RCTView and reflow the parent view layout

I'm working on a react native wrapper to a 3rd party library. I need to display a view that will display an image that is loaded via the third party library. So i first add a subclass of RCTView in the view hierarchy, start loading the image and…
otusweb
  • 1,638
  • 1
  • 19
  • 30
0
votes
0 answers

onCreate not call for startService - Native-modules

I use react-native modules. I create a java class that extend service to create a foreground notification. Inside my primary module java class i try to start service with : getReactApplicationContext() .startService( …
0
votes
0 answers

How to import a iOS library after adding it to expo project?

I have an expo project, and I added the iOS library named "OPPWAMobile.xcframework" from xcode (added it to Frameworks) I have a local native module in the path "modules/oppwa" inside that module I have the following OPPWA-Briding-Header.h…
0
votes
0 answers

How to call events or methods like onTextChanged of EditText in Fabric native components react native

I am working on fabric native component and i need to access some methods like, getText() onChangedText() onClick() isEnabled() how to call these types of methods in fabric native component in android as of now i am following this doc…
0
votes
0 answers

How can I get the URL for BookmarkData in Swift when using it in a React Native native module?

Trying to call this method but url is not getting from bookmark data. /// Returns an Asset pointing to a file on disk if it exists. func localAssetForStream(withName name: String) -> Asset? { let userDefaults = UserDefaults.standard …
0
votes
0 answers

Style React Native Android Native module using Java

I'm working on Android native module, and I'm trying to add padding to the view from Java code, what is happening is that the child view is not pushed when I'm using setPadding method, any idea why? public class TestView extends ReactViewGroup { …