Пример #1
0
 // This is the main entry point of the application.
 static void Main(string[] args)
 {
     RaygunClient.Initialize("YOUR_APP_API_KEY").AttachCrashReporting().AttachPulse();
     // if you want to use a different Application Delegate class from "AppDelegate"
     // you can specify it here.
     UIApplication.Main(args, null, "AppDelegate");
 }
Пример #2
0
        public AppInsights()
        {
            RaygunClient.Initialize(Keys.CrashReportingKey).AttachPulse();

            var appVersion         = NSBundle.MainBundle.ObjectForInfoDictionary("CFBundleShortVersionString").ToString();
            var buildNumber        = NSBundle.MainBundle.ObjectForInfoDictionary("CFBundleVersion").ToString();
            var applicationVersion = $"{appVersion}.{buildNumber}";

            RaygunClient.Current.ApplicationVersion = applicationVersion;
        }
Пример #3
0
 private void InitCrashProviders()
 {
     RaygunClient.Initialize("gNHcZkwjVWdhTW4nuDL/NA==").AttachCrashReporting().AttachPulse(this);
     AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) =>
     {
         var logger = new Logger();
         logger.Log(args.Exception);
         args.Handled = true;
     };
 }
Пример #4
0
        // This is the main entry point of the application.
        static void Main(string[] args)
        {
            // if you want to use a different Application Delegate class from "AppDelegate"
            // you can specify it here.
            var iosAppConfig = new IosAppConfig();


#if (APPSTORE || PLAYSTORE)
            RaygunClient.Initialize(iosAppConfig.StoreAppRaygunKey).AttachCrashReporting().AttachPulse();
#elif (BETA)
            RaygunClient.Initialize(iosAppConfig.BetaAppRaygunKey).AttachCrashReporting().AttachPulse();
#else
            RaygunClient.Initialize(iosAppConfig.TestAppRaygunKey).AttachCrashReporting().AttachPulse();
#endif

            UIApplication.Main(args, null, "AppDelegate");
        }
Пример #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            RaygunClient.Initialize("YOUR_APP_API_KEY").AttachCrashReporting().AttachPulse(this);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.MyButton);

            button.Click += delegate
            {
                throw new Exception("Something has gone horribly wrong");
            };
        }
Пример #6
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            WireupDependency();

            ScreenSize = new Size(ConvertPixelsToDp(Resources.DisplayMetrics.WidthPixels), ConvertPixelsToDp(Resources.DisplayMetrics.HeightPixels));

            int StatusBarHeightResourceId = Resources.GetIdentifier("status_bar_height", "dimen", "android");

            StatusBarHeight = StatusBarHeightResourceId > 0 ? Resources.GetDimensionPixelSize(StatusBarHeightResourceId) : 0;

            TypedArray styledAttributes = this.Theme.ObtainStyledAttributes(new int[] { Android.Resource.Attribute.ActionBarSize });

            ActionBarHeight = (int)styledAttributes.GetDimension(0, 0);

            AppContentResolver = this.ContentResolver;

            var androidAppConfig = new AndroidAppConfig();

#if (APPSTORE || PLAYSTORE)
            RaygunClient.Initialize(androidAppConfig.StoreAppRaygunKey).AttachCrashReporting().AttachPulse(this);
#elif (BETA)
            RaygunClient.Initialize(androidAppConfig.BetaAppRaygunKey).AttachCrashReporting().AttachPulse(this);
#else
            RaygunClient.Initialize(androidAppConfig.TestAppRaygunKey).AttachCrashReporting().AttachPulse(this);
#endif

            global::Xamarin.Forms.Forms.Init(this, bundle);

            var application = (Xamarin.Forms.Application)ContainerManager.Container.Resolve(typeof(App), typeof(App).GetType().ToString());
            LoadApplication(application);
        }
Пример #7
0
 private void InitHockeyAppAndRaygun()
 {
     UpdateManager.Register(this, HOCKEYAPPID);
     MetricsManager.Register(Application, HOCKEYAPPID);
     RaygunClient.Initialize("gNHcZkwjVWdhTW4nuDL/NA==").AttachCrashReporting().AttachPulse(this);
 }