mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 06:30:41 +00:00
✨ setAutoScreenRecordingMaxDuration and setAutoScreenRecordingEnabled APIs
This commit is contained in:
parent
d2126d0667
commit
728b07647a
@ -233,6 +233,37 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/Disable screen recording
|
||||||
|
*
|
||||||
|
* @param autoScreenRecordingEnabled boolean for enable/disable
|
||||||
|
* screen recording on crash feature
|
||||||
|
*/
|
||||||
|
@ReactMethod
|
||||||
|
public void setAutoScreenRecordingEnabled(boolean autoScreenRecordingEnabled) {
|
||||||
|
try {
|
||||||
|
Instabug.setAutoScreenRecordingEnabled(autoScreenRecordingEnabled);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets auto screen recording maximum duration
|
||||||
|
*
|
||||||
|
* @param autoScreenRecordingMaxDuration maximum duration of the screen recording video
|
||||||
|
* in milliseconds
|
||||||
|
* The maximum duration is 30000 milliseconds
|
||||||
|
*/
|
||||||
|
@ReactMethod
|
||||||
|
public void setAutoScreenRecordingMaxDuration(int autoScreenRecordingMaxDuration) {
|
||||||
|
try {
|
||||||
|
Instabug.setAutoScreenRecordingMaxDuration(autoScreenRecordingMaxDuration);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change Locale of Instabug UI elements(defaults to English)
|
* Change Locale of Instabug UI elements(defaults to English)
|
||||||
*
|
*
|
||||||
|
20
index.js
20
index.js
@ -60,6 +60,26 @@ module.exports = {
|
|||||||
Instabug.setUserData(userData);
|
Instabug.setUserData(userData);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/Disable screen recording
|
||||||
|
* @param {boolean} autoScreenRecordingEnabled boolean for enable/disable
|
||||||
|
* screen recording on crash feature
|
||||||
|
*/
|
||||||
|
setAutoScreenRecordingEnabled: function(autoScreenRecordingEnabled) {
|
||||||
|
Instabug.setAutoScreenRecordingEnabled(autoScreenRecordingEnabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets auto screen recording maximum duration
|
||||||
|
*
|
||||||
|
* @param autoScreenRecordingMaxDuration maximum duration of the screen recording video
|
||||||
|
* in milliseconds
|
||||||
|
* The maximum duration is 30000 milliseconds
|
||||||
|
*/
|
||||||
|
setAutoScreenRecordingMaxDuration: function(autoScreenRecordingMaxDuration) {
|
||||||
|
Instabug.setAutoScreenRecordingMaxDuration(autoScreenRecordingMaxDuration)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds custom logs that will be sent with each report.
|
* Adds custom logs that will be sent with each report.
|
||||||
* @param {string} log Message to be logged.
|
* @param {string} log Message to be logged.
|
||||||
|
@ -78,6 +78,14 @@ RCT_EXPORT_METHOD(setUserStepsEnabled:(BOOL)isUserStepsEnabled) {
|
|||||||
[Instabug setUserStepsEnabled:isUserStepsEnabled];
|
[Instabug setUserStepsEnabled:isUserStepsEnabled];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCT_EXPORT_METHOD(setAutoScreenRecordingEnabled:(BOOL)enabled) {
|
||||||
|
[Instabug setAutoScreenRecordingEnabled:enabled];
|
||||||
|
}
|
||||||
|
|
||||||
|
RCT_EXPORT_METHOD(setAutoScreenRecordingMaxDuration:(CGFloat)duration) {
|
||||||
|
[Instabug setAutoScreenRecordingDuration:duration];
|
||||||
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
|
RCT_EXPORT_METHOD(setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
|
||||||
if (callBack != nil) {
|
if (callBack != nil) {
|
||||||
[Instabug setPreSendingHandler:^{
|
[Instabug setPreSendingHandler:^{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user