How to use the appcenter-crashes.ErrorAttachmentLog.attachmentWithText function in appcenter-crashes

To help you get started, we’ve selected a few appcenter-crashes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / appcenter-sdk-react-native / TestApp34 / MainScreen.js View on Github external
getErrorAttachments(report) {
    console.log(`Get error attachments for report with id: ${report.id}'`);
    return [
      ErrorAttachmentLog.attachmentWithText('hello', 'hello.txt'),
      ErrorAttachmentLog.attachmentWithBinary(testIcon, 'icon.png', 'image/png')
    ];
  },
github microsoft / appcenter-sdk-react-native / DemoApp / MainScreen.js View on Github external
return (async () => {
      const [textAttachment, binaryAttachment, binaryName, binaryType] = await Promise.all([
        AttachmentsProvider.getTextAttachment(),
        AttachmentsProvider.getBinaryAttachment(),
        AttachmentsProvider.getBinaryName(),
        AttachmentsProvider.getBinaryType(),
      ]);
      return [ErrorAttachmentLog.attachmentWithText(textAttachment, 'hello.txt'),
        ErrorAttachmentLog.attachmentWithBinary(binaryAttachment, binaryName, binaryType)];
    })();
  },
github microsoft / appcenter-sdk-react-native / TestAppTypescript / src / MainScreen.tsx View on Github external
return (async () => {
      const [
        textAttachment,
        binaryAttachment,
        binaryName,
        binaryType
      ] = await Promise.all([
        AttachmentsProvider.getTextAttachment(),
        AttachmentsProvider.getBinaryAttachment(),
        AttachmentsProvider.getBinaryName(),
        AttachmentsProvider.getBinaryType()
      ]);
      //TODO type of binary attachment is always string?
      return [
        ErrorAttachmentLog.attachmentWithText(textAttachment, "hello.txt"),
        ErrorAttachmentLog.attachmentWithBinary(
          binaryAttachment,
          binaryName,
          binaryType
        )
      ];
    })();
  },
github microsoft / appcenter-sdk-react-native / DemoApp / app / App.js View on Github external
return (async () => {
      const attachments = [];
      const [textAttachment, binaryAttachment, binaryName, binaryType] = await Promise.all([
        AttachmentsProvider.getTextAttachment(),
        AttachmentsProvider.getBinaryAttachment(),
        AttachmentsProvider.getBinaryName(),
        AttachmentsProvider.getBinaryType(),
      ]);
      if (textAttachment !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithText(textAttachment, 'hello.txt'));
      }
      if (binaryAttachment !== null && binaryName !== null && binaryType !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithBinary(binaryAttachment, binaryName, binaryType));
      }
      return attachments;
    })();
  },
github microsoft / appcenter-sdk-react-native / TestApp / app / App.js View on Github external
return (async () => {
      const attachments = [];
      const [textAttachment, binaryAttachment, binaryName, binaryType] = await Promise.all([
        AttachmentsProvider.getTextAttachment(),
        AttachmentsProvider.getBinaryAttachment(),
        AttachmentsProvider.getBinaryName(),
        AttachmentsProvider.getBinaryType(),
      ]);
      if (textAttachment !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithText(textAttachment, 'hello.txt'));
      }
      if (binaryAttachment !== null && binaryName !== null && binaryType !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithBinary(binaryAttachment, binaryName, binaryType));
      }
      return attachments;
    })();
  },