コード例 #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);
        }
コード例 #2
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!");
        }