diff --git a/docs/platforms/react-native/common/configuration/out-of-process-crash-handling.mdx b/docs/platforms/react-native/common/configuration/out-of-process-crash-handling.mdx new file mode 100644 index 0000000000000..81df86a2764b2 --- /dev/null +++ b/docs/platforms/react-native/common/configuration/out-of-process-crash-handling.mdx @@ -0,0 +1,27 @@ +--- +title: Out-of-Process Native Crash Handling +description: "Learn how to send native crash reports from a separate process on Android." +sidebar_order: 90 +--- + +On Android, the React Native SDK uses [Sentry Native](/platforms/native/) through the [Android SDK's NDK integration](/platforms/android/configuration/using-ndk/) to capture native crashes. By default, it uses Sentry Native's `inproc` backend, which handles crashes inside the crashed application and sends the crash reports on the next launch of the application. + +Alternatively, you can enable [out-of-process crash handling](/platforms/android/configuration/using-ndk/#out-of-process-crash-handling). A crash service then handles crashes outside the crashed application and sends the crash reports at crash time, instead of on the next launch. + + + +Out-of-process crash handling is experimental. + + + +## Configuration + +Set `SENTRY_NATIVE_BACKEND` to `native` in `android/gradle.properties`, or as an environment variable in your local build environment and CI, before building the application: + +```properties {filename:android/gradle.properties} +SENTRY_NATIVE_BACKEND=native +``` + +This is a build-time setting, not a JavaScript SDK initialization option. + +The crash service runs in a separate process, where Android creates a second instance of your `Application` class. See [Second Application Instance](/platforms/android/configuration/using-ndk/#second-application-instance).