Ejemplo n.º 1
0
        protected override void OnResume()
        {
            // Handle when your app resumes

            // ISSUE #11
            // Call the Method TrackEvent() of the package Microsoft.AppCenter.Analytics, through the helper class AppCenterHelper
            // This helper class helps us to group all methods related to AppCenter, modifing its behaviour when necessary
            AppCenterHelper.TrackEvent("user resumed the app", userInfo);
        }
Ejemplo n.º 2
0
 // Solves issue #19: Catch carshes and report them as errors
 private void Button_Clicked_ReportCrashAsAnError(object sender, EventArgs e)
 {
     try
     {
         throw new Exception(); // We simulate an app crash by thrwoing an exception
     }
     catch (Exception ex)
     {
         AppCenterHelper.TrackError(ex, userInfo);
     }
 }
Ejemplo n.º 3
0
        protected override async void OnStart()
        {
            // Handle when your app starts
            AppCenter.Start("android=f93b9933-3135-4a2c-bc1d-7b2c4bb2439c;ios=aeaed092-f87c-465f-8916-c23f13c7fa81", typeof(Analytics), typeof(Crashes));

            // ISSUE #12
            // Check if the app crashed on last session
            bool didAppCrash = await Crashes.HasCrashedInLastSessionAsync();

            if (didAppCrash)
            {
                await MainPage.DisplayAlert("Sorry for that!", "It seems like the app crashed before." + Environment.NewLine + "We are working on that issue to fix it.", "It's ok!");
            }

            // ISSUE #11
            // Call the Method TrackEvent() of the package Microsoft.AppCenter.Analytics, through the helper class AppCenterHelper
            // This helper class helps us to group all methods related to AppCenter, modifing its behaviour when necessary
            AppCenterHelper.TrackEvent("user started the app", userInfo);

            // ISSUE #28
            // This is a dummy function to test Continous Delivery
            await MainPage.DisplayAlert("CD", "Hey, this is to test the Continuous Delivery!", "NEAT!");
        }