File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,37 @@ public void appendTags(ReadableArray tags) {
233233 }
234234 }
235235
236+ /**
237+ * Enable/Disable screen recording
238+ *
239+ * @param autoScreenRecordingEnabled boolean for enable/disable
240+ * screen recording on crash feature
241+ */
242+ @ ReactMethod
243+ public void setAutoScreenRecordingEnabled (boolean autoScreenRecordingEnabled ) {
244+ try {
245+ Instabug .setAutoScreenRecordingEnabled (autoScreenRecordingEnabled );
246+ } catch (Exception e ) {
247+ e .printStackTrace ();
248+ }
249+ }
250+
251+ /**
252+ * Sets auto screen recording maximum duration
253+ *
254+ * @param autoScreenRecordingMaxDuration maximum duration of the screen recording video
255+ * in milliseconds
256+ * The maximum duration is 30000 milliseconds
257+ */
258+ @ ReactMethod
259+ public void setAutoScreenRecordingMaxDuration (int autoScreenRecordingMaxDuration ) {
260+ try {
261+ Instabug .setAutoScreenRecordingMaxDuration (autoScreenRecordingMaxDuration );
262+ } catch (Exception e ) {
263+ e .printStackTrace ();
264+ }
265+ }
266+
236267 /**
237268 * Change Locale of Instabug UI elements(defaults to English)
238269 *
Original file line number Diff line number Diff line change @@ -60,6 +60,26 @@ module.exports = {
6060 Instabug . setUserData ( userData ) ;
6161 } ,
6262
63+ /**
64+ * Enable/Disable screen recording
65+ * @param {boolean } autoScreenRecordingEnabled boolean for enable/disable
66+ * screen recording on crash feature
67+ */
68+ setAutoScreenRecordingEnabled : function ( autoScreenRecordingEnabled ) {
69+ Instabug . setAutoScreenRecordingEnabled ( autoScreenRecordingEnabled ) ;
70+ } ,
71+
72+ /**
73+ * Sets auto screen recording maximum duration
74+ *
75+ * @param autoScreenRecordingMaxDuration maximum duration of the screen recording video
76+ * in milliseconds
77+ * The maximum duration is 30000 milliseconds
78+ */
79+ setAutoScreenRecordingMaxDuration : function ( autoScreenRecordingMaxDuration ) {
80+ Instabug . setAutoScreenRecordingMaxDuration ( autoScreenRecordingMaxDuration )
81+ } ,
82+
6383 /**
6484 * Adds custom logs that will be sent with each report.
6585 * @param {string } log Message to be logged.
Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ - (dispatch_queue_t)methodQueue {
7878 [Instabug setUserStepsEnabled: isUserStepsEnabled];
7979}
8080
81+ RCT_EXPORT_METHOD (setAutoScreenRecordingEnabled:(BOOL )enabled) {
82+ [Instabug setAutoScreenRecordingEnabled: enabled];
83+ }
84+
85+ RCT_EXPORT_METHOD (setAutoScreenRecordingMaxDuration:(CGFloat)duration) {
86+ [Instabug setAutoScreenRecordingDuration: duration];
87+ }
88+
8189RCT_EXPORT_METHOD (setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
8290 if (callBack != nil ) {
8391 [Instabug setPreSendingHandler: ^{
You can’t perform that action at this time.
0 commit comments