Skip to content

Commit 2113679

Browse files
authored
📝 Adds missing method in android module (#50)
1 parent 4e074ef commit 2113679

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,25 @@ public void run() {
535535
});
536536
}
537537

538+
/**
539+
* Sets whether attachments in bug reporting and in-app messaging are enabled or not.
540+
*
541+
* @param screenshot A boolean to enable or disable screenshot attachments.
542+
* @param {boolean} extraScreenShot A boolean to enable or disable extra screenshot attachments.
543+
* @param {boolean} galleryImage A boolean to enable or disable gallery image attachments.
544+
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
545+
*/
546+
@ReactMethod
547+
public void setEnabledAttachmentTypes(boolean screenshot, boolean extraScreenshot, boolean
548+
galleryImage, boolean screenRecording) {
549+
try {
550+
BugReporting.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage,
551+
screenRecording);
552+
} catch (Exception e) {
553+
e.printStackTrace();
554+
}
555+
}
556+
538557
/**
539558
* Gets tags.
540559
*

0 commit comments

Comments
 (0)