123456789101112131415161718192021222324 |
- using System;
- using Android.App;
- using Android.Content.PM;
- using Avalonia;
- using Avalonia.Android;
- namespace MobileSandbox.Android
- {
- [Activity(Label = "MobileSandbox.Android", Theme = "@style/MyTheme.NoActionBar", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
- public class MainActivity : AvaloniaMainActivity<App>
- {
- protected override void OnCreate(Bundle savedInstanceState)
- {
- AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;
-
- base.OnCreate(savedInstanceState);
- }
- private void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
- {
- System.Diagnostics.Debug.WriteLine(e.ToString());
- }
- }
- }
|