File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -672,6 +672,26 @@ public void clearLogs() {
672
672
}
673
673
}
674
674
675
+ /**
676
+ * Returns true if the survey with a specific token was answered before.
677
+ * Will return false if the token does not exist or if the survey was not answered before.
678
+ *
679
+ * @param surveyToken the attribute key as string
680
+ * @param hasRespondedCallback A callback that gets invoked with the returned value of whether
681
+ * the user has responded to the survey or not.
682
+ * @return the desired value of whether the user has responded to the survey or not.
683
+ */
684
+ @ ReactMethod
685
+ public void hasRespondedToSurveyWithToken (String surveyToken , Callback hasRespondedCallback ) {
686
+ boolean hasResponded ;
687
+ try {
688
+ hasResponded = Instabug .hasRespondToSurvey (surveyToken );
689
+ hasRespondedCallback .invoke (hasResponded );
690
+ } catch (Exception e ) {
691
+ e .printStackTrace ();
692
+ }
693
+ }
694
+
675
695
/**
676
696
* Shows survey with a specific token.
677
697
* Does nothing if there are no available surveys with that specific token.
You can’t perform that action at this time.
0 commit comments