From 367bb9a5021c1ba5b9f476632de1567a3bbc1dc4 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Thu, 2 May 2019 07:38:15 -0700 Subject: [PATCH] Updated the documentation of the crash reporter plugin Summary: As per title Reviewed By: passy Differential Revision: D15181759 fbshipit-source-id: b184c730bbd349cd432956790e8dc192d3fd5ca0 --- docs/setup/crash-reporter-plugin.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/setup/crash-reporter-plugin.md b/docs/setup/crash-reporter-plugin.md index a28d31ea7..16956eb19 100644 --- a/docs/setup/crash-reporter-plugin.md +++ b/docs/setup/crash-reporter-plugin.md @@ -4,28 +4,20 @@ 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.md). 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. -## iOS - - - -```objectivec -#import - -[client addPlugin:[FlipperKitCrashReporterPlugin sharedInstance]]; +```java +import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; +CrashReporterPlugin.getInstance().sendExceptionMessage(Thread.currentThread(), error); ``` - -```swift -import FlipperKit - -client?.add(FlipperKitCrashReporterPlugin.sharedInstance()); -``` -