{"id":1512,"date":"2022-08-30T15:17:09","date_gmt":"2022-08-30T15:17:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/26\/displaying-a-dialog-on-unhandled-exception-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:09","modified_gmt":"2022-08-30T15:17:09","slug":"displaying-a-dialog-on-unhandled-exception-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/displaying-a-dialog-on-unhandled-exception-collection-of-common-programming-errors\/","title":{"rendered":"Displaying a dialog on unhandled exception-Collection of common programming errors"},"content":{"rendered":"<p>I want to be able to display a dialog when my Xamarin Android application crashes. Something like &#8216;Sorry application has crashed. Would you like to send an error report to the developer?&#8221;.<\/p>\n<p>I&#8217;ve hooked into Thread.DefaultUncaughtExceptionHandler which calls UncaughtException when an exception is caught.<\/p>\n<p>When the exception is caught I try to start a new activity to display the dialog &#8211; the dialog is created but only a blank dialog with the title is shown. OnCreate is never called and the dialog seems to just hang.<\/p>\n<p>If I call the code to display the dialog just normally when the application is running it displays and runs correctly so it doesn&#8217;t seem to be anything wrong with the dialog code.<\/p>\n<p>Anyone know how to solve this problem?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-26 18:02:43. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I want to be able to display a dialog when my Xamarin Android application crashes. Something like &#8216;Sorry application has crashed. Would you like to send an error report to the developer?&#8221;. I&#8217;ve hooked into Thread.DefaultUncaughtExceptionHandler which calls UncaughtException when an exception is caught. When the exception is caught I try to start a new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1512","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1512"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1512\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}