You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Demonstrate how to use IsCrashedLastRun in the MAUI Android sample #4048
While initiating Sentry for MAUI the options.CrashedLastRun is always null. Maybe the following line is run later? options.CrashedLastRun = () => JavaSdk.Sentry.IsCrashedLastRun()?.BooleanValue() is true;
I know iOS implementation has the feature added to the sample, could the android sample also be updated to expose how CrashedLatRun should be interpreted in the consumer code?
Ideally we'd use this in conjunction with the new User Feedback API to prompt users for feedback when crashes occur. We can do this currently - it would be even better if we could get the id of the event that crashed the app though. See feature request in the Android SDK for this:
This could be very nice to have documented. As of now, I can't see a way to access this information with the current implementation, as the IsCrashedLastRun delegate gets set up doing SDK initialization, which is the point where I would expect to be able to actually run it.
Is there a way to access the delegate after it has left the SDK initialization scope?
@jamescrosswell A little bit. This was more to do with OnCrashedLastRun event on iOS (and OnBeforeSend). Unfortunately, on android, the native SDK doesn't have a OnCrashedLastRun to bind to
Unfortunately, on android, the native SDK doesn't have a OnCrashedLastRun to bind to
Yes I saw that. There's an open issue in the repo for the Java SDK (referenced in the description above). If we had that functionality we could build a more sophisticated sample for Android.
Regarding the query @jurganson had, we may need to look for any samples for this functionality in the Java SDK repository and check to ensure we can replicate the same when the .NET SDK is wrapping this.
@aritchie if you're spread too thin to investigate this, maybe something @Flash0ver could look into? This is closely related to the CaptureFeedback APIs...
Activity
jurganson commentedon Apr 4, 2025
This could be very nice to have documented. As of now, I can't see a way to access this information with the current implementation, as the IsCrashedLastRun delegate gets set up doing SDK initialization, which is the point where I would expect to be able to actually run it.
Is there a way to access the delegate after it has left the SDK initialization scope?
jamescrosswell commentedon Apr 7, 2025
@aritchie I think you played around with this already right?
aritchie commentedon Apr 7, 2025
@jamescrosswell A little bit. This was more to do with OnCrashedLastRun event on iOS (and OnBeforeSend). Unfortunately, on android, the native SDK doesn't have a OnCrashedLastRun to bind to
jamescrosswell commentedon Apr 8, 2025
Yes I saw that. There's an open issue in the repo for the Java SDK (referenced in the description above). If we had that functionality we could build a more sophisticated sample for Android.
Regarding the query @jurganson had, we may need to look for any samples for this functionality in the Java SDK repository and check to ensure we can replicate the same when the .NET SDK is wrapping this.
@aritchie if you're spread too thin to investigate this, maybe something @Flash0ver could look into? This is closely related to the
CaptureFeedbackAPIs...