Skip to content

Commit 4c1ff84

Browse files
2 parents cfc8751 + 7b417f0 commit 4c1ff84

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,23 @@ public void setPrimaryColor(int primaryColor) {
211211
}
212212
}
213213

214+
/**
215+
* Sets whether attachments in bug reporting and in-app messaging are enabled or not.
216+
* @param {boolean} screenShot A boolean to enable or disable screenshot attachments.
217+
* @param {boolean} extraScreenShot A boolean to enable or disable extra screenshot attachments.
218+
* @param {boolean} galleryImage A boolean to enable or disable gallery image attachments.
219+
* @param {boolean} voiceNote A boolean to enable or disable voice note attachments.
220+
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
221+
*/
222+
@ReactMethod
223+
public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean galleryImage, boolean voiceNote, boolean screenRecording) {
224+
try {
225+
mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording);
226+
} catch (Exception e) {
227+
e.printStackTrace();
228+
}
229+
}
230+
214231
/**
215232
* Appends a log message to Instabug internal log
216233
* <p>

0 commit comments

Comments
 (0)