📝 Android - Adjust the setAttachmentTypesEnabled to remove the voicenote parameter as per the native SDK

This commit is contained in:
Salma ElTarzi 2018-01-04 12:58:15 +02:00
parent cccb8d3557
commit 94fcfc2f27
2 changed files with 7 additions and 9 deletions

View File

@ -357,15 +357,14 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
* @param {boolean} screenShot A boolean to enable or disable screenshot attachments. * @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} extraScreenShot A boolean to enable or disable extra screenshot attachments.
* @param {boolean} galleryImage A boolean to enable or disable gallery image 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. * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
*/ */
@ReactMethod @ReactMethod
public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean
galleryImage, boolean voiceNote, boolean screenRecording) { galleryImage, boolean screenRecording) {
try { try {
mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage,
voiceNote, screenRecording); screenRecording);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -399,13 +399,12 @@ module.exports = {
* @param {boolean} galleryImage A boolean to enable or disable gallery image * @param {boolean} galleryImage A boolean to enable or disable gallery image
* attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in * attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in
* info.plist to enable gallery image attachments. * 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. * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
*/ */
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording) { setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, screenRecording) {
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording); if(Platform.OS == 'android')
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, screenRecording);
}, },
/** /**