Skip to content

This is an example on how to integrate Mobile Center Analytics and Crashes to Xamarin.Forms application.

Notifications You must be signed in to change notification settings

makubex88/AppMobileDevOps

Repository files navigation

AppMobileDevOps

This is an example on how to integrate Mobile Center Analytics and Crashes to Xamarin.Forms application.

Mobile Center can track your application events, logs, and crashes which is essential for your app's growth and rating.

How to use:

  1. Add Nuget Packages(using Manage Nuget Packages) and add the following codes that you want to track by Mobile Center:
    
        using Microsoft.Azure.Mobile;
        using Microsoft.Azure.Mobile.Analytics;
        using Microsoft.Azure.Mobile.Crashes;
        
  2. Add your Android key from Mobile Center for Xamarin.Forms in App.xaml.cs
    
          protected override void OnStart()
          {
              // Handle when your app starts
              MobileCenter.Start($"android={androidKey};", typeof(Analytics), typeof(Crashes));
          }
          
  3. Add Tracking Event:
    
          var param = new Dictionary();
          param.Add("Blue button", "Button");
          Analytics.TrackEvent("Blue button was clicked", param);
          


    Add Crash Event:
    bool didAppCrash = await Crashes.HasCrashedInLastSessionAsync();

Mobile Center Screenshot

Crashes


Analytics-Overview


Analytics-Events


Analytics-LogFlow


Mobile Screen


About

This is an example on how to integrate Mobile Center Analytics and Crashes to Xamarin.Forms application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published