diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java
index 27c105cf6..e4d62aa2c 100644
--- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java
+++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java
@@ -4,7 +4,9 @@
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
+import android.support.annotation.Nullable;
+import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
@@ -16,6 +18,7 @@
import com.facebook.react.bridge.WritableNativeMap;
import com.facebook.react.bridge.Callback;
+import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.instabug.library.Instabug;
import com.instabug.library.internal.module.InstabugLocale;
import com.instabug.library.invocation.InstabugInvocationEvent;
@@ -1013,7 +1016,6 @@ public void setIntroMessageEnabled(boolean enabled) {
}
}
-
/**
* Sets the runnable that gets executed just before showing any valid survey
* WARNING: This runs on your application's main UI thread. Please do not include
@@ -1237,6 +1239,14 @@ private Locale getLocaleByKey(String instabugLocale) {
}
}
+ private void sendEvent(ReactApplicationContext reactContext,
+ String eventName,
+ @Nullable WritableMap params) {
+ reactContext
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
+ .emit(eventName, params);
+ }
+
@Override
public Map getConstants() {
final Map constants = new HashMap<>();
diff --git a/index.js b/index.js
index e153f37f2..d14c2aa6d 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,4 @@
-import {NativeModules, NativeAppEventEmitter, Platform} from "react-native";
+import {NativeModules, NativeAppEventEmitter, DeviceEventEmitter, Platform} from "react-native";
let {Instabug} = NativeModules;
/**