File tree 3 files changed +59
-0
lines changed
android/src/main/java/com/instabug/reactlibrary
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) {
233
233
}
234
234
}
235
235
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
+
236
267
/**
237
268
* Change Locale of Instabug UI elements(defaults to English)
238
269
*
Original file line number Diff line number Diff line change @@ -60,6 +60,26 @@ module.exports = {
60
60
Instabug . setUserData ( userData ) ;
61
61
} ,
62
62
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
+
63
83
/**
64
84
* Adds custom logs that will be sent with each report.
65
85
* @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 {
78
78
[Instabug setUserStepsEnabled: isUserStepsEnabled];
79
79
}
80
80
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
+
81
89
RCT_EXPORT_METHOD (setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
82
90
if (callBack != nil ) {
83
91
[Instabug setPreSendingHandler: ^{
You can’t perform that action at this time.
0 commit comments