|
4 | 4 | import android.net.Uri;
|
5 | 5 | import android.os.Handler;
|
6 | 6 | import android.os.Looper;
|
| 7 | +import android.support.annotation.Nullable; |
7 | 8 |
|
| 9 | +import com.facebook.react.bridge.Arguments; |
8 | 10 | import com.facebook.react.bridge.ReactApplicationContext;
|
9 | 11 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
10 | 12 | import com.facebook.react.bridge.ReactMethod;
|
|
16 | 18 | import com.facebook.react.bridge.WritableNativeMap;
|
17 | 19 | import com.facebook.react.bridge.Callback;
|
18 | 20 |
|
| 21 | +import com.facebook.react.modules.core.DeviceEventManagerModule; |
19 | 22 | import com.instabug.library.Instabug;
|
20 | 23 | import com.instabug.library.internal.module.InstabugLocale;
|
21 | 24 | import com.instabug.library.invocation.InstabugInvocationEvent;
|
@@ -1013,7 +1016,6 @@ public void setIntroMessageEnabled(boolean enabled) {
|
1013 | 1016 | }
|
1014 | 1017 | }
|
1015 | 1018 |
|
1016 |
| - |
1017 | 1019 | /**
|
1018 | 1020 | * Sets the runnable that gets executed just before showing any valid survey<br/>
|
1019 | 1021 | * WARNING: This runs on your application's main UI thread. Please do not include
|
@@ -1237,6 +1239,14 @@ private Locale getLocaleByKey(String instabugLocale) {
|
1237 | 1239 | }
|
1238 | 1240 | }
|
1239 | 1241 |
|
| 1242 | + private void sendEvent(ReactApplicationContext reactContext, |
| 1243 | + String eventName, |
| 1244 | + @Nullable WritableMap params) { |
| 1245 | + reactContext |
| 1246 | + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) |
| 1247 | + .emit(eventName, params); |
| 1248 | + } |
| 1249 | + |
1240 | 1250 | @Override
|
1241 | 1251 | public Map<String, Object> getConstants() {
|
1242 | 1252 | final Map<String, Object> constants = new HashMap<>();
|
|
0 commit comments