Skip to content

Commit 0e6521c

Browse files
Add @ReactModule annotation
Add `@ReactModule` annotation, this will eventually be used by TurboModules annotation processor.
1 parent 024041b commit 0e6521c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowserModule.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
import com.facebook.react.bridge.ReactContextBaseJavaModule;
88
import com.facebook.react.bridge.ReactMethod;
99
import com.facebook.react.bridge.ReadableMap;
10+
import com.facebook.react.module.annotations.ReactModule;
1011

12+
@ReactModule(name = RNInAppBrowserModule.NAME)
1113
public class RNInAppBrowserModule extends ReactContextBaseJavaModule {
14+
public final static String NAME = "RNInAppBrowser";
15+
1216
private final RNInAppBrowser inAppBrowser;
1317
private final ReactApplicationContext reactContext;
1418

@@ -20,7 +24,7 @@ public RNInAppBrowserModule(ReactApplicationContext reactContext) {
2024

2125
@Override
2226
public String getName() {
23-
return "RNInAppBrowser";
27+
return NAME;
2428
}
2529

2630
@ReactMethod
@@ -33,4 +37,4 @@ public void open(final ReadableMap options, final Promise promise) {
3337
public void close() {
3438
inAppBrowser.close();
3539
}
36-
}
40+
}

0 commit comments

Comments
 (0)