diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 478b56c..71ebe58 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -357,15 +357,14 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * @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) { + galleryImage, boolean screenRecording) { try { - mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, - voiceNote, screenRecording); + Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, + screenRecording); } catch (Exception e) { e.printStackTrace(); } diff --git a/index.js b/index.js index dd05ed5..3cfaa79 100644 --- a/index.js +++ b/index.js @@ -399,13 +399,12 @@ module.exports = { * @param {boolean} galleryImage A boolean to enable or disable gallery image * attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in * info.plist to enable gallery image attachments. - * @param {boolean} voiceNote A boolean to enable or disable voice note attachments. - * In iOS 10+, NSMicrophoneUsageDescription should be set in info.plist to enable - * voiceNote attachments. * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments. */ - setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording) { - Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording); + setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, screenRecording) { + if(Platform.OS == 'android') + Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, screenRecording); + }, /**