@@ -909,7 +909,7 @@ public void setPreInvocationHandler(final Callback preInvocationHandler) {
909909 Runnable preInvocationRunnable = new Runnable () {
910910 @ Override
911911 public void run () {
912- preInvocationHandler . invoke ( );
912+ sendEvent ( getReactApplicationContext (), "IBGpreInvocationHandler" , null );
913913 }
914914 };
915915 mInstabug .setPreInvocation (preInvocationRunnable );
@@ -933,7 +933,7 @@ public void setPreSendingHandler(final Callback preSendingHandler) {
933933 Runnable preSendingRunnable = new Runnable () {
934934 @ Override
935935 public void run () {
936- preSendingHandler . invoke ( );
936+ sendEvent ( getReactApplicationContext (), "IBGpreSendingHandler" , null );
937937 }
938938 };
939939 mInstabug .setPreSendingRunnable (preSendingRunnable );
@@ -957,7 +957,10 @@ public void setPostInvocationHandler(final Callback postInvocationHandler) {
957957 mInstabug .setOnSdkDismissedCallback (new OnSdkDismissedCallback () {
958958 @ Override
959959 public void onSdkDismissed (DismissType issueState , Bug .Type bugType ) {
960- postInvocationHandler .invoke ();
960+ WritableMap params = Arguments .createMap ();
961+ params .putString ("issueState" ,issueState .toString ());
962+ params .putString ("bugType" ,bugType .toString ());
963+ sendEvent (getReactApplicationContext (), "IBGpostInvocationHandler" , params );
961964 }
962965 });
963966
@@ -1022,7 +1025,7 @@ public void setWillShowSurveyHandler(final Callback willShowSurveyHandler) {
10221025 Runnable willShowSurveyRunnable = new Runnable () {
10231026 @ Override
10241027 public void run () {
1025- willShowSurveyHandler . invoke ( );
1028+ sendEvent ( getReactApplicationContext (), "IBGWillShowSurvey" , null );
10261029 }
10271030 };
10281031 mInstabug .setPreShowingSurveyRunnable (willShowSurveyRunnable );
@@ -1044,7 +1047,7 @@ public void setDidDismissSurveyHandler(final Callback didDismissSurveyHandler) {
10441047 Runnable didDismissSurveyRunnable = new Runnable () {
10451048 @ Override
10461049 public void run () {
1047- didDismissSurveyHandler . invoke ( );
1050+ sendEvent ( getReactApplicationContext (), "IBGDidDismissSurvey" , null );
10481051 }
10491052 };
10501053 mInstabug .setAfterShowingSurveyRunnable (didDismissSurveyRunnable );
@@ -1115,7 +1118,7 @@ public void setOnNewMessageHandler(final Callback onNewMessageHandler) {
11151118 Runnable onNewMessageRunnable = new Runnable () {
11161119 @ Override
11171120 public void run () {
1118- onNewMessageHandler . invoke ( );
1121+ sendEvent ( getReactApplicationContext (), "IBGonNewMessageHandler" , null );
11191122 }
11201123 };
11211124 mInstabug .setNewMessageHandler (onNewMessageRunnable );
0 commit comments