Repository navigation
Opening a dialog in the event handler of AppDomain.CurrentDomain.UnhandledException is not possible, #32943
Answered
by
ahakMiethke
ahakMiethke
asked this question in
Q&A
|
I am trying to show the user a dialog when the app crashes with an UnhandledException to improve user experience. However, it seems that this is not working as intended. Can someone guide me on how to do that? This is a dummy code of how i am trying to do it |
Answered by
ahakMiethke
Dec 15, 2025
Replies: 1 comment 1 reply
|
It seems like not terminating the app is not possible on ios, but on android you can look at this example #653 (comment) |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
AppDomain.CurrentDomain.UnhandledExceptionis triggered, the app will terminate no matter what and doing any UI stuff is not supported at that level. However, the event mentioned above is triggered only when a debugger is attached. If the app is executed without a debugger, theAndroid.Runtime.AndroidEnvironment.UnhandledExceptionRaiserevent will be triggered and we can stop the app from terminating and do any logic as we wish.