HomeDocumentationAPI Reference
Getting StartedAPI ReferenceHelp CenterVideo Tours

Set Attachment Types

You can set the types of attachments your users can add to reports using this API.

The available attachment types are:

  • Initial Screenshot
  • Extra Screenshot
  • Gallery Image
  • Screen Recording
Method

BugReporting.enabledAttachmentTypes = [.screenShot, .screenRecording]
IBGBugReporting.enabledAttachmentTypes = IBGAttachmentTypeScreenShot | IBGAttachmentTypeScreenRecording;
// Arguments:initialScreenshot, extraScreenshot, galleryImage & ScreenRecording
BugReporting.setAttachmentTypesEnabled(true, true, true, true);
Instabug.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);

//All properties are boolean values
cordova.plugins.bugReporting.setEnabledAttachmentTypes(screenshot,
  extraScreenshot,
  galleryImage,
  screenRecording,
  success,
  error);

//All properties are boolean values
//iOS

IBGBugReporting.EnabledAttachmentTypes = IBGAttachmentType.Screenshot | IBGAttachmentType.ScreenRecording;

//Android 
//Boolean parameters: initialScreenshot,  extraScreenshot,  galleryImage,  ScreenRecording
new Instabug.Builder(this, "ANDROID_APP_TOKEN")
    .SetInvocationEvent(InstabugInvocationEvent.Shake)
    .SetAttachmentTypesEnabled(true, true, true, false)
    .Build();
//Boolean arguments
BugReporting.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);
Attachment Types Enums:

//Inital Screenshot
.screenShot
//Extra Screenshot
.extraScreenShot
//Gallery Image
.galleryImage
//Screen Recording
.screenRecording
//Inital Screenshot
IBGAttachmentTypeScreenshot;
//Extra Screenshot
IBGAttachmentTypeExtraScreenshot;
//Gallery Image
IBGAttachmentTypeGalleryImage;
//Screen Recording
IBGAttachmentTypeScreenRecording;
//iOS Only
IBGAttachmentType.ScreenRecording
IBGAttachmentType.Screenshot
IBGAttachmentType.ExtraScreenshot
IBGAttachmentType.GalleryImage