Skip to content

Commit 239bb20

Browse files
committed
✨ Add setAutoShowingSurveysEnabled API for Android
1 parent 05ffea7 commit 239bb20

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,21 @@ public void setThresholdForReshowingSurveyAfterDismiss(int sessionsCount, int da
13271327
}
13281328
}
13291329

1330+
/**
1331+
* Set Surveys auto-showing state, default state auto-showing enabled
1332+
*
1333+
* @param autoShowingSurveysEnabled whether Surveys should be auto-showing or not
1334+
*
1335+
*/
1336+
@ReactMethod
1337+
public void setAutoShowingSurveysEnabled(boolean autoShowingSurveysEnabled) {
1338+
try {
1339+
Instabug.setSurveysAutoShowing(autoShowingSurveysEnabled);
1340+
} catch (Exception e) {
1341+
e.printStackTrace();
1342+
}
1343+
}
1344+
13301345
/**
13311346
* Set whether new in app notification received will play a small sound notification
13321347
* or not (Default is {@code false})

0 commit comments

Comments
 (0)