diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 5b2016795..b45432a14 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -535,6 +535,25 @@ public void run() { }); } + /** + * Sets whether attachments in bug reporting and in-app messaging are enabled or not. + * + * @param screenshot A boolean to enable or disable screenshot attachments. + * @param {boolean} extraScreenShot A boolean to enable or disable extra screenshot attachments. + * @param {boolean} galleryImage A boolean to enable or disable gallery image attachments. + * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments. + */ + @ReactMethod + public void setEnabledAttachmentTypes(boolean screenshot, boolean extraScreenshot, boolean + galleryImage, boolean screenRecording) { + try { + BugReporting.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, + screenRecording); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** * Gets tags. * diff --git a/package.json b/package.json index 111445b1f..3fb32d6b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instabug-reactnative", - "version": "8.1.5", + "version": "8.1.6", "description": "React Native plugin for integrating the Instabug SDK", "main": "index.js", "types": "index.d.ts",