react-native-wakeword-sid 1.1.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/KeyWordRNBridge.podspec +58 -0
  2. package/LICENSE +21 -0
  3. package/README.md +282 -0
  4. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  5. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  6. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/8.9/gc.properties +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/android/.gradle/vcs-1/gc.properties +0 -0
  12. package/android/build.gradle +48 -0
  13. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar +0 -0
  14. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.md5 +1 -0
  15. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.sha1 +1 -0
  16. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom +10 -0
  17. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom.md5 +1 -0
  18. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom.sha1 +1 -0
  19. package/android/settings.gradle +2 -0
  20. package/android/src/main/AndroidManifest.xml +17 -0
  21. package/android/src/main/assets/hey_lookdeep.dm +0 -0
  22. package/android/src/main/assets/layer1.dm +0 -0
  23. package/android/src/main/assets/need_help_now.dm +0 -0
  24. package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridge.java +331 -0
  25. package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridgePackage.java +25 -0
  26. package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridge.java +373 -0
  27. package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridgePackage.java +24 -0
  28. package/android/src/main/libs/MyLibrary-release.aar +0 -0
  29. package/app.plugin.js +60 -0
  30. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/Info.plist +44 -0
  31. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +399 -0
  32. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection.h +18 -0
  33. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Info.plist +0 -0
  34. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/KeyWordDetection +0 -0
  35. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.abi.json +5570 -0
  36. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +157 -0
  37. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  38. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftinterface +157 -0
  39. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/module.modulemap +11 -0
  40. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +794 -0
  41. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection.h +18 -0
  42. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Info.plist +0 -0
  43. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/KeyWordDetection +0 -0
  44. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.abi.json +5570 -0
  45. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +157 -0
  46. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  47. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftinterface +157 -0
  48. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +5570 -0
  49. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +157 -0
  50. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  51. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +157 -0
  52. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/module.modulemap +11 -0
  53. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeDirectory +0 -0
  54. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeRequirements +0 -0
  55. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeRequirements-1 +0 -0
  56. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeResources +297 -0
  57. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeSignature +0 -0
  58. package/ios/KeyWordRNBridge/KeyWordRNBridge.h +19 -0
  59. package/ios/KeyWordRNBridge/KeyWordRNBridge.mm +395 -0
  60. package/ios/KeyWordRNBridge/models/coca_cola_model_28_05052025.onnx +0 -0
  61. package/ios/KeyWordRNBridge/models/embedding_model.onnx +0 -0
  62. package/ios/KeyWordRNBridge/models/hey_lookdeep.onnx +0 -0
  63. package/ios/KeyWordRNBridge/models/melspectrogram.onnx +0 -0
  64. package/ios/KeyWordRNBridge/models/need_help_now.onnx +0 -0
  65. package/ios/KeyWordRNBridge/models/silero_vad.onnx +0 -0
  66. package/package.json +74 -0
  67. package/speakerid/SpeakerIdRNBridge.d.ts +44 -0
  68. package/speakerid/SpeakerIdRNBridge.js +169 -0
  69. package/wakewords/KeyWordRNBridge.d.ts +37 -0
  70. package/wakewords/KeyWordRNBridge.js +221 -0
  71. package/wakewords/index.d.ts +10 -0
  72. package/wakewords/index.js +21 -0
  73. package/wakewords/useModel.d.ts +19 -0
  74. package/wakewords/useModel.tsx +235 -0
@@ -0,0 +1,331 @@
1
+ package com.davoice.keywordspotting;
2
+
3
+ import com.davoice.keywordsdetection.keywordslibrary.KeyWordsDetection;
4
+ import com.facebook.react.bridge.*;
5
+ import com.facebook.react.modules.core.DeviceEventManagerModule;
6
+ import androidx.annotation.Nullable;
7
+ import ai.onnxruntime.*;
8
+ import android.util.Log;
9
+ import java.util.HashMap;
10
+ import java.util.Map;
11
+
12
+ public class KeyWordRNBridge extends ReactContextBaseJavaModule {
13
+
14
+ private final String TAG = "KeyWordsDetection";
15
+ private static final String REACT_CLASS = "KeyWordRNBridge";
16
+ private static ReactApplicationContext reactContext;
17
+
18
+ // VAD API:
19
+ private final Map<String, Float> vadThresholdByInstance = new HashMap<>();
20
+ private final Map<String, Integer> vadMsWindowByInstance = new HashMap<>();
21
+ private static final float DEFAULT_VAD_THRESHOLD = 0.45f;
22
+ private static final int DEFAULT_VAD_MSWINDOW = 1000;
23
+
24
+ // Map to hold multiple instances
25
+ private Map<String, KeyWordsDetection> instances = new HashMap<>();
26
+
27
+ public KeyWordRNBridge(ReactApplicationContext context) {
28
+ super(context);
29
+ reactContext = context;
30
+ }
31
+
32
+ @Override
33
+ public String getName() {
34
+ return REACT_CLASS;
35
+ }
36
+
37
+ @ReactMethod
38
+ public void setKeywordDetectionLicense(String instanceId, String licenseKey, Promise promise) {
39
+ KeyWordsDetection instance = instances.get(instanceId);
40
+ Log.d(TAG, "setKeywordDetectionLicense()");
41
+
42
+ Boolean isLicesed = false;
43
+ if (instance != null) {
44
+ isLicesed = instance.setLicenseKey(licenseKey);
45
+ }
46
+ Log.d(TAG, "setKeywordDetectionLicense(): " + (isLicesed ? "Licensed" : "Not Licensed"));
47
+
48
+ promise.resolve(isLicesed);
49
+ }
50
+
51
+ // Create a new instance efficiently
52
+ @ReactMethod
53
+ public void createInstanceMulti(String instanceId, ReadableArray modelPathsArray, ReadableArray thresholdsArray, ReadableArray bufferCntsArray, ReadableArray msBetweenCallbackArray, Promise promise) {
54
+ if (instances.containsKey(instanceId)) {
55
+ promise.reject("InstanceExists", "Instance already exists with ID: " + instanceId);
56
+ return;
57
+ }
58
+
59
+ try {
60
+ int size = modelPathsArray.size();
61
+ if (thresholdsArray.size() != size || bufferCntsArray.size() != size || msBetweenCallbackArray.size() != size) {
62
+ promise.reject("InvalidArguments", "All input arrays must be the same length.");
63
+ return;
64
+ }
65
+
66
+ // Convert ReadableArrays to Java arrays
67
+ String[] modelPaths = new String[size];
68
+ float[] thresholds = new float[size];
69
+ int[] bufferCnts = new int[size];
70
+ long[] msBetweenCallback = new long[size];
71
+
72
+ for (int i = 0; i < size; i++) {
73
+ modelPaths[i] = modelPathsArray.getString(i);
74
+ thresholds[i] = (float) thresholdsArray.getDouble(i);
75
+ bufferCnts[i] = bufferCntsArray.getInt(i);
76
+ msBetweenCallback[i] = (long) msBetweenCallbackArray.getDouble(i); // RN uses Double for all numbers
77
+ }
78
+
79
+ // Create instance
80
+ KeyWordsDetection keyWordsDetection = new KeyWordsDetection(reactContext, modelPaths, thresholds, bufferCnts, msBetweenCallback);
81
+ keyWordsDetection.initialize((detected, modelName) -> onKeywordDetected(instanceId, detected, modelName));
82
+
83
+ instances.put(instanceId, keyWordsDetection);
84
+ vadThresholdByInstance.put(instanceId, DEFAULT_VAD_THRESHOLD);
85
+ vadMsWindowByInstance.put(instanceId, DEFAULT_VAD_MSWINDOW);
86
+
87
+ promise.resolve("Multi-model instance created with ID: " + instanceId);
88
+
89
+ } catch (Exception e) {
90
+ promise.reject("CreateError", "Failed to create multi-model instance: " + e.getMessage());
91
+ }
92
+ }
93
+
94
+ // Create a new instance
95
+ @ReactMethod
96
+ public void createInstance(String instanceId, String modelName, float threshold, int bufferCnt, Promise promise) {
97
+ if (instances.containsKey(instanceId)) {
98
+ promise.reject("InstanceExists", "Instance already exists with ID: " + instanceId);
99
+ return;
100
+ }
101
+
102
+ try {
103
+ KeyWordsDetection keyWordsDetection = new KeyWordsDetection(reactContext, modelName, threshold, bufferCnt);
104
+ keyWordsDetection.initialize((detected, ignored) -> onKeywordDetected(instanceId, detected, modelName));
105
+ vadThresholdByInstance.put(instanceId, DEFAULT_VAD_THRESHOLD);
106
+ vadMsWindowByInstance.put(instanceId, DEFAULT_VAD_MSWINDOW);
107
+
108
+ instances.put(instanceId, keyWordsDetection);
109
+ promise.resolve("Instance created with ID: " + instanceId);
110
+ } catch (Exception e) {
111
+ promise.reject("CreateError", "Failed to create instance: " + e.getMessage());
112
+ }
113
+ }
114
+
115
+ @ReactMethod
116
+ public void getRecordingWav(String instanceId, Promise promise) {
117
+ KeyWordsDetection instance = instances.get(instanceId);
118
+ String recordingWav = "";
119
+ if (instance == null) {
120
+ promise.reject("Instance not Exists", "Instance does not exists with ID: " + instanceId);
121
+ }
122
+ try {
123
+ recordingWav = instance.getRecordingWav();
124
+ promise.resolve(recordingWav);
125
+ } catch (Exception e) {
126
+ promise.reject("GetRecordingWavError", "Failed to get recording WAV: " + e.getMessage());
127
+ }
128
+ }
129
+
130
+ // Create a new instance
131
+ @ReactMethod
132
+ public void replaceKeywordDetectionModel(String instanceId, String modelName, float threshold, int bufferCnt, Promise promise) {
133
+ KeyWordsDetection instance = instances.get(instanceId);
134
+ if (instance == null) {
135
+ promise.reject("Instance not Exists", "Instance does not exists with ID: " + instanceId);
136
+ return;
137
+ }
138
+
139
+ try {
140
+ instance.replaceKeywordDetectionModel(reactContext, modelName, threshold, bufferCnt);
141
+ promise.resolve("Instance ID: " + instanceId + " change model " + modelName);
142
+ } catch (Exception e) {
143
+ promise.reject("CreateError", "Failed to create instance: " + e.getMessage());
144
+ }
145
+ }
146
+
147
+ // Start detection for a specific instance
148
+ @ReactMethod
149
+ public void startKeywordDetection(String instanceId, float threshold, Promise promise) throws OrtException {
150
+ KeyWordsDetection instance = instances.get(instanceId);
151
+ if (instance != null) {
152
+ instance.startListening(threshold);
153
+ promise.resolve("Started detection for instance: " + instanceId);
154
+ } else {
155
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
156
+ }
157
+ }
158
+
159
+ // Stop detection for a specific instance
160
+ @ReactMethod
161
+ public void stopForegroundService(String instanceId, Promise promise) {
162
+ KeyWordsDetection instance = instances.get(instanceId);
163
+ if (instance != null) {
164
+ instance.stopForegroundService();
165
+ promise.resolve("stopForegroundService" + instanceId);
166
+ } else {
167
+ promise.reject("stopForegroundService", "No instance found with ID: " + instanceId);
168
+ }
169
+ }
170
+
171
+ // Stop detection for a specific instance
172
+ @ReactMethod
173
+ public void startForegroundService(String instanceId, Promise promise) {
174
+ KeyWordsDetection instance = instances.get(instanceId);
175
+ if (instance != null) {
176
+ instance.startForegroundService();
177
+ promise.resolve("startForegroundService" + instanceId);
178
+ } else {
179
+ promise.reject("startForegroundService", "No instance found with ID: " + instanceId);
180
+ }
181
+ }
182
+
183
+ // Stop detection for a specific instance
184
+ @ReactMethod
185
+ public void stopKeywordDetection(String instanceId, Promise promise) {
186
+ KeyWordsDetection instance = instances.get(instanceId);
187
+ if (instance != null) {
188
+ instance.stopListening();
189
+ promise.resolve("Stopped detection for instance: " + instanceId);
190
+ } else {
191
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
192
+ }
193
+ }
194
+
195
+ // Destroy an instance
196
+ @ReactMethod
197
+ public void destroyInstance(String instanceId, Promise promise) {
198
+ KeyWordsDetection instance = instances.remove(instanceId);
199
+ vadThresholdByInstance.remove(instanceId); // NEW
200
+ vadMsWindowByInstance.remove(instanceId); // NEW
201
+ if (instance != null) {
202
+ instance.stopListening();
203
+ // Additional cleanup if necessary
204
+ promise.resolve("Destroyed instance: " + instanceId);
205
+ } else {
206
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
207
+ }
208
+ }
209
+
210
+ // Handle keyword detection event
211
+ private void onKeywordDetected(String instanceId, boolean detected, String modelName) {
212
+ if (detected) {
213
+ WritableMap params = Arguments.createMap();
214
+ params.putString("instanceId", instanceId);
215
+ params.putString("phrase", modelName);
216
+ params.putString("modelName", modelName);
217
+ sendEvent("onKeywordDetectionEvent", params);
218
+ }
219
+ }
220
+
221
+ // Send event to JavaScript
222
+ private void sendEvent(String eventName, @Nullable WritableMap params) {
223
+ reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
224
+ .emit(eventName, params);
225
+ }
226
+
227
+ // VAD API:
228
+
229
+ // ===== Add: VAD parity methods (anywhere among other @ReactMethod methods) =====
230
+ @ReactMethod
231
+ public void getVoiceProps(String instanceId, Promise promise) {
232
+ KeyWordsDetection instance = instances.get(instanceId);
233
+ if (instance == null) {
234
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
235
+ return;
236
+ }
237
+ try {
238
+ @SuppressWarnings("unchecked")
239
+ Map<String, Object> props = instance.getVoiceProps();
240
+ WritableMap out = Arguments.createMap();
241
+
242
+ Object err = props.get("error");
243
+ Object prob = props.get("voiceProbability");
244
+ Object last = props.get("lastTimeHumanVoiceHeard");
245
+
246
+ out.putString("error", err == null ? "" : String.valueOf(err));
247
+ out.putDouble("voiceProbability", prob instanceof Number ? ((Number) prob).doubleValue() : 0.0);
248
+ out.putDouble("lastTimeHumanVoiceHeard", last instanceof Number ? ((Number) last).doubleValue() : 0.0);
249
+
250
+ promise.resolve(out);
251
+ } catch (Exception e) {
252
+ promise.reject("GetVoicePropsError", e.getMessage());
253
+ }
254
+ }
255
+
256
+ @ReactMethod
257
+ public void startVADDetection(String instanceId, Promise promise) {
258
+ KeyWordsDetection instance = instances.get(instanceId);
259
+ if (instance == null) {
260
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
261
+ return;
262
+ }
263
+ try {
264
+ float thr = vadThresholdByInstance.getOrDefault(instanceId, DEFAULT_VAD_THRESHOLD);
265
+ int win = vadMsWindowByInstance.getOrDefault(instanceId, DEFAULT_VAD_MSWINDOW);
266
+ instance.setVADParams(thr, win);
267
+ boolean ok = instance.startVADListening();
268
+ promise.resolve(ok);
269
+ } catch (Exception e) {
270
+ promise.reject("StartVADError", e.getMessage());
271
+ }
272
+ }
273
+
274
+ @ReactMethod
275
+ public void stopVADDetection(String instanceId, Promise promise) {
276
+ KeyWordsDetection instance = instances.get(instanceId);
277
+ if (instance == null) {
278
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
279
+ return;
280
+ }
281
+ try {
282
+ instance.stopVADListening();
283
+ promise.resolve("Stopped VAD for instance: " + instanceId);
284
+ } catch (Exception e) {
285
+ promise.reject("StopVADError", e.getMessage());
286
+ }
287
+ }
288
+
289
+ @ReactMethod
290
+ public void setVADParams(String instanceId, double threshold, int msWindow, Promise promise) {
291
+ KeyWordsDetection instance = instances.get(instanceId);
292
+ if (instance == null) {
293
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
294
+ return;
295
+ }
296
+ try {
297
+ float thr = (float) threshold;
298
+ vadThresholdByInstance.put(instanceId, thr);
299
+ vadMsWindowByInstance.put(instanceId, msWindow);
300
+ instance.setVADParams(thr, msWindow);
301
+ promise.resolve(null);
302
+ } catch (Exception e) {
303
+ promise.reject("SetVADParamsError", e.getMessage());
304
+ }
305
+ }
306
+
307
+ @ReactMethod
308
+ public void getVADParams(String instanceId, Promise promise) {
309
+ if (!instances.containsKey(instanceId)) {
310
+ promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
311
+ return;
312
+ }
313
+ WritableMap out = Arguments.createMap();
314
+ float thr = vadThresholdByInstance.getOrDefault(instanceId, DEFAULT_VAD_THRESHOLD);
315
+ int win = vadMsWindowByInstance.getOrDefault(instanceId, DEFAULT_VAD_MSWINDOW);
316
+ out.putDouble("threshold", (double) thr);
317
+ out.putInt("msWindow", win);
318
+ promise.resolve(out);
319
+ }
320
+
321
+ @ReactMethod
322
+ public void addListener(String eventName) {
323
+ // Set up any upstream listeners or background tasks as necessary
324
+ }
325
+
326
+ @ReactMethod
327
+ public void removeListeners(Integer count) {
328
+ // Remove upstream listeners, stop unnecessary background tasks
329
+ }
330
+ // Implement other methods as needed, ensuring to use instanceId
331
+ }
@@ -0,0 +1,25 @@
1
+ package com.davoice.keywordspotting;
2
+
3
+ import com.facebook.react.ReactPackage;
4
+ import com.facebook.react.bridge.NativeModule;
5
+ import com.facebook.react.bridge.ReactApplicationContext;
6
+ import com.facebook.react.uimanager.ViewManager;
7
+
8
+ import java.util.ArrayList;
9
+ import java.util.Collections;
10
+ import java.util.List;
11
+
12
+ public class KeyWordRNBridgePackage implements ReactPackage {
13
+
14
+ @Override
15
+ public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
16
+ List<NativeModule> modules = new ArrayList<>();
17
+ modules.add(new KeyWordRNBridge(reactContext));
18
+ return modules;
19
+ }
20
+
21
+ @Override
22
+ public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
23
+ return Collections.emptyList();
24
+ }
25
+ }