Пример #1
0
        private void RegisterHockeyApp()
        {
            //CrashManager.Register(this, AppSettings.HockeyAppID);
            //UpdateManager.Register(this, AppSettings.HockeyAppID);

            // Initialize the HockeyApp TraceWriter
            TraceWriter.Initialize();

            // Wire up Unhandled Expcetion handler from Android
            AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) =>
            {
                // Use the trace writer to log exceptions so HockeyApp finds them
                TraceWriter.WriteTrace(args.Exception);
                args.Handled = true;
            };

            // Wire up the .NET Unhandled Exception handler
            AppDomain.CurrentDomain.UnhandledException +=
                (sender, args) => TraceWriter.WriteTrace(args.ExceptionObject);

            // Wire up the unobserved task exception handler
            TaskScheduler.UnobservedTaskException +=
                (sender, args) => TraceWriter.WriteTrace(args.Exception);
        }