sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Add SentrySDK.detectedStartUpCrash

Open krystofwoldrich opened this issue 1 year ago • 2 comments

Description

This feature was recently added to sentry-cocoa and was requested in sentry-react-native.

To enable it in RN, we need sentry-android to support it.

Feature summary: A flag users can read during the Application start-up, when true the application crashed during the previous start-up.

krystofwoldrich avatar Mar 08 '24 14:03 krystofwoldrich

@krystofwoldrich we do have isCrashedLastRun() on Java/Android, would this be feasible to use?

https://github.com/getsentry/sentry-java/blob/878fd7b411aef94ee58661148f53bc9f4b6c7d80/sentry/src/main/java/io/sentry/IScopes.java#L625-L636

markushi avatar Mar 12 '25 10:03 markushi

Looks like we'd still need to provide a separate flag for app startup crashes, because isCrashedLastRun does not tell us what kind of crash that was

romtsn avatar Mar 19 '25 13:03 romtsn