Skip to content

Commit fd57c4c

Browse files
committed
https://github.com/rusel1989/react-native-bluetooth-serial/pull/101
Deprecated createJSModules on Android only for RN >= 0.47
1 parent 05fa600 commit fd57c4c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

android/src/main/java/com/rusel/RCTBluetoothSerial/RCTBluetoothSerialPackage.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.rusel.RCTBluetoothSerial;
22

3-
import java.util.Arrays;
3+
import java.util.ArrayList;
44
import java.util.Collections;
55
import java.util.List;
66

@@ -15,15 +15,18 @@ public class RCTBluetoothSerialPackage implements ReactPackage {
1515

1616
@Override
1717
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
18-
return Arrays.<NativeModule>asList(new RCTBluetoothSerialModule(reactContext));
18+
List<NativeModule> modules = new ArrayList<>();
19+
modules.add(new RCTBluetoothSerialModule(reactContext));
20+
return modules;
1921
}
2022

23+
// Deprecated RN 0.47
2124
public List<Class<? extends JavaScriptModule>> createJSModules() {
22-
return Collections.emptyList();
25+
return Collections.emptyList();
2326
}
2427

2528
@Override
2629
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
27-
return Collections.emptyList();
30+
return Collections.emptyList();
2831
}
2932
}

0 commit comments

Comments
 (0)