From 3e1f9ce1a21a9705c2a01da5ca95e0c89d48ce22 Mon Sep 17 00:00:00 2001 From: Yair Loeza Date: Mon, 9 Jan 2017 16:35:22 -0800 Subject: [PATCH] React native js bridge for setAttachmentTypesEnabled instabug method --- .../RNInstabugReactnativeModule.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 1a0ecd6..e658208 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -211,6 +211,23 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } } + /** + * Sets whether attachments in bug reporting and in-app messaging are enabled or not. + * @param {boolean} 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} voiceNote A boolean to enable or disable voice note attachments. + * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments. + */ + @ReactMethod + public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean galleryImage, boolean voiceNote, boolean screenRecording) { + try { + mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** * Appends a log message to Instabug internal log *