How to use the appcenter-crashes.isEnabled 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 / CrashesScreen.js View on Github external
async componentDidMount() {
    let status = '';
    const component = this;

    const crashesEnabled = await Crashes.isEnabled();
    component.setState({ crashesEnabled });

    const crashedInLastSession = await Crashes.hasCrashedInLastSession();

    status += `Crashed: ${crashedInLastSession ? 'yes' : 'no'}\n\n`;
    component.setState({ lastSessionStatus: status });

    if (crashedInLastSession) {
      const crashReport = await Crashes.lastSessionCrashReport();

      status += JSON.stringify(crashReport, null, 4);
      component.setState({ lastSessionStatus: status });
    }
  }
github microsoft / appcenter-sdk-react-native / TestApp / app / screens / CrashesScreen.js View on Github external
toggle: async () => {
                    await Crashes.setEnabled(!this.state.crashesEnabled);
                    const crashesEnabled = await Crashes.isEnabled();
                    this.setState({ crashesEnabled });
                  }
                },
github microsoft / appcenter-sdk-react-native / TestApp / app / screens / CrashesScreen.js View on Github external
async refreshToggle() {
    const crashesEnabled = await Crashes.isEnabled();
    this.setState({ crashesEnabled });
  }
github microsoft / appcenter-sdk-react-native / TestApp / CrashesScreen.js View on Github external
async componentDidMount() {
    let status = '';
    const component = this;

    const crashesEnabled = await Crashes.isEnabled();
    component.setState({ crashesEnabled });

    const crashedInLastSession = await Crashes.hasCrashedInLastSession();

    status += `Crashed: ${crashedInLastSession ? 'yes' : 'no'}\n\n`;
    component.setState({ lastSessionStatus: status });

    if (crashedInLastSession) {
      const crashReport = await Crashes.lastSessionCrashReport();

      status += JSON.stringify(crashReport, null, 4);
      component.setState({ lastSessionStatus: status });
    }
  }
github microsoft / appcenter-sdk-react-native / TestAppTypescript / src / CrashesScreen.tsx View on Github external
async componentDidMount() {
    let status = "";
    const component = this;

    const crashesEnabled = await Crashes.isEnabled();
    component.setState({ crashesEnabled });

    const crashedInLastSession = await Crashes.hasCrashedInLastSession();

    status += `Crashed: ${crashedInLastSession ? "yes" : "no"}\n\n`;
    component.setState({ lastSessionStatus: status });

    if (crashedInLastSession) {
      const crashReport = await Crashes.lastSessionCrashReport();

      status += JSON.stringify(crashReport, null, 4);
      component.setState({ lastSessionStatus: status });
    }

    const textAttachmentValue = await AttachmentsProvider.getTextAttachment();
    component.setState({ textAttachment: textAttachmentValue });
github microsoft / appcenter-sdk-react-native / DemoApp / app / screens / CrashesScreen.js View on Github external
async refreshToggle() {
    const crashesEnabled = await Crashes.isEnabled();
    this.setState({ crashesEnabled });
  }
github microsoft / appcenter-sdk-react-native / TestApp / CrashesScreen.js View on Github external
async toggleEnabled() {
    await Crashes.setEnabled(!this.state.crashesEnabled);

    const crashesEnabled = await Crashes.isEnabled();
    this.setState({ crashesEnabled });
  }
github microsoft / appcenter-sdk-react-native / DemoApp / CrashesScreen.js View on Github external
async componentDidMount() {
    let status = '';
    const component = this;

    const crashesEnabled = await Crashes.isEnabled();
    component.setState({ crashesEnabled });

    const crashedInLastSession = await Crashes.hasCrashedInLastSession();

    status += `Crashed: ${crashedInLastSession ? 'yes' : 'no'}\n\n`;
    component.setState({ lastSessionStatus: status });

    if (crashedInLastSession) {
      const crashReport = await Crashes.lastSessionCrashReport();

      status += JSON.stringify(crashReport, null, 4);
      component.setState({ lastSessionStatus: status });
    }

     const textAttachmentValue = await AttachmentsProvider.getTextAttachment();
     component.setState({ textAttachment: textAttachmentValue });
github microsoft / appcenter-sdk-react-native / TestApp34 / CrashesScreen.js View on Github external
async toggleEnabled() {
    await Crashes.setEnabled(!this.state.crashesEnabled);

    const crashesEnabled = await Crashes.isEnabled();
    this.setState({ crashesEnabled });
  }