Skip to content

Commit 94fcfc2

Browse files
committed
📝 Android - Adjust the setAttachmentTypesEnabled to remove the voicenote parameter as per the native SDK
1 parent cccb8d3 commit 94fcfc2

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,14 @@ public void setPrimaryColor(int primaryColor) {
357357
* @param {boolean} screenShot A boolean to enable or disable screenshot attachments.
358358
* @param {boolean} extraScreenShot A boolean to enable or disable extra screenshot attachments.
359359
* @param {boolean} galleryImage A boolean to enable or disable gallery image attachments.
360-
* @param {boolean} voiceNote A boolean to enable or disable voice note attachments.
361360
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
362361
*/
363362
@ReactMethod
364363
public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean
365-
galleryImage, boolean voiceNote, boolean screenRecording) {
364+
galleryImage, boolean screenRecording) {
366365
try {
367-
mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage,
368-
voiceNote, screenRecording);
366+
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage,
367+
screenRecording);
369368
} catch (Exception e) {
370369
e.printStackTrace();
371370
}

‎index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,12 @@ module.exports = {
399399
* @param {boolean} galleryImage A boolean to enable or disable gallery image
400400
* attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in
401401
* info.plist to enable gallery image attachments.
402-
* @param {boolean} voiceNote A boolean to enable or disable voice note attachments.
403-
* In iOS 10+, NSMicrophoneUsageDescription should be set in info.plist to enable
404-
* voiceNote attachments.
405402
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
406403
*/
407-
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording) {
408-
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording);
404+
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, screenRecording) {
405+
if(Platform.OS == 'android')
406+
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, screenRecording);
407+
409408
},
410409

411410
/**

0 commit comments

Comments
 (0)