File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -1472,6 +1472,21 @@ public void setSessionProfilerEnabled(boolean sessionProfilerEnabled) {
14721472 }
14731473 }
14741474
1475+ /**
1476+ * Set Surveys welcome screen enabled, default value is false
1477+ *
1478+ * @param shouldShow shouldShow whether should a welcome screen be shown
1479+ * before taking surveys or not
1480+ */
1481+ @ ReactMethod
1482+ public void setShouldShowSurveysWelcomeScreen (boolean shouldShow ) {
1483+ try {
1484+ InstabugSurvey .setShouldShowSurveysWelcomeScreen (shouldShow );
1485+ } catch (java .lang .Exception exception ) {
1486+ exception .printStackTrace ();
1487+ }
1488+ }
1489+
14751490 private InstabugCustomTextPlaceHolder .Key getStringToKeyConstant (String key ) {
14761491 switch (key ) {
14771492 case SHAKE_HINT :
Original file line number Diff line number Diff line change @@ -928,7 +928,7 @@ module.exports = {
928928 } else {
929929 Instabug . sendHandledJSCrash ( jsonObject ) ;
930930 }
931- } ,
931+ } ,
932932
933933 /**
934934 * Sets the default position at which the Instabug screen recording button will be shown.
@@ -972,6 +972,17 @@ module.exports = {
972972 Instabug . showFeatureRequests ( ) ;
973973 } ,
974974
975+ /**
976+ * Setting an option for all the surveys to show a welcome screen before
977+ * the user starts taking the survey.
978+ * @param shouldShowWelcomeScreen A boolean for setting whether the
979+ * welcome screen should show.
980+ *
981+ */
982+ setShouldShowSurveysWelcomeScreen : function ( shouldShowWelcomeScreen ) {
983+ Instabug . setShouldShowSurveysWelcomeScreen ( shouldShowWelcomeScreen ) ;
984+ } ,
985+
975986 /**
976987 * The event used to invoke the feedback form
977988 * @readonly
Original file line number Diff line number Diff line change @@ -410,6 +410,10 @@ - (dispatch_queue_t)methodQueue {
410410 [Instabug showFeatureRequests ];
411411}
412412
413+ RCT_EXPORT_METHOD (setShouldShowSurveysWelcomeScreen:(BOOL )shouldShowWelcomeScreen) {
414+ [Instabug setShouldShowSurveysWelcomeScreen: shouldShowWelcomeScreen];
415+ }
416+
413417RCT_EXPORT_METHOD (isRunningLive:(RCTResponseSenderBlock)callback) {
414418 BOOL result = NO ;
415419#if TARGET_OS_SIMULATOR
You can’t perform that action at this time.
0 commit comments