Files
flipper/docs/setup/crash-reporter-plugin.mdx
John Knox 7e4682b694 Fix the remaining broken links on fbflipper.com
Summary:
Used https://www.brokenlinkcheck.com/broken-links.php#status for now to find broken links and fixed them all.

Would be better to use some automated tool to check this at diff time, but that's not setup yet.

Reviewed By: passy

Differential Revision: D21301702

fbshipit-source-id: f13c8769b15d9f99563fc65dc0544320d07a2bfb
2020-04-29 07:33:43 -07:00

24 lines
1.0 KiB
Plaintext

---
id: crash-reporter-plugin
title: Crash Reporter Setup
sidebar_label: Crash Reporter
---
You do not have to instantiate it in your app in order to use its basic functionality mentioned [here](../features/crash-reporter-plugin). You can also use crash reporter plugin to send the notifications for the exception which you suppress in your Android application. You could even use it to send the notifications when the [Litho Error Boundary](https://fblitho.com/docs/error-boundaries) is triggered. In order to send your custom notification you will have to follow the following steps.
## Android
Instantiate and add the plugin in `FlipperClient`.
```java
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
client.addPlugin(CrashReporterPlugin.getInstance());
```
Use the following API to trigger your custom crash notification.
```java
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
CrashReporterPlugin.getInstance().sendExceptionMessage(Thread.currentThread(), error);
```