From 829ec3ad804aae958813026ab544055faf7dfbba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Staltz?= Date: Wed, 10 Apr 2019 16:48:02 +0300 Subject: [PATCH] android: Use ReactModule annotation from 0.58 As react-native 0.58, native modules now need the ReactModule Java annotation. PR-URL: https://github.com/janeasystems/nodejs-mobile-react-native/pull/9 Refs: https://github.com/react-native-community/react-native-releases/blob/72dde0d270685f44d2f827544267502dcb0b6235/CHANGELOG.md#058 Reviewed-By: Jaime Bernardo --- .../com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java b/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java index 0981424..e882a0c 100644 --- a/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java +++ b/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java @@ -5,6 +5,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.modules.core.RCTNativeAppEventEmitter; +import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableType; @@ -25,6 +26,7 @@ import java.util.*; import java.util.concurrent.Semaphore; +@ReactModule(name = "RNNodeJsMobile") public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements LifecycleEventListener { private final ReactApplicationContext reactContext;