Introduction To Crash Analytics In Xamarin.Forms App

Introduction

Crash Analytics is the approach where the developer/ team will get all the crash reports and app usage statistics and user details. It helps developers to know about the truth on the ground; i.e., where the application gets exceptions, errors, and user events. By using this data, developers will learn where the users are struggling with  the application.

There are different kinds of Crash Analytics tools available, which are listed below,

  1. Flurry Analytics
  2. Raygun
  3. Google Analytics
  4. Amplitude
  5. Apple App Analytics
  6. Apsalar
  7. Countly

Solution

Here we are going to use Flurry Analytics. Follow the below steps to add flurry analytics in Xamarin Forms applications.

  • Go to dev.flurry.com and complete the registration process,




  • After completing the registration process, choose the platform i.e. Android / iOS.


  • Enter the application name.
  • On the dashboard you can see the different apps which you have created.





  • Now go to Admin Tab and at the left hand side select application option, here you will find the API key respective to the applications and platforms.

  • Now open your Xamarin Forms project and add Flurry Nuget Package in your Portable project.




  • Now go to Droid Project’s MainActivity.cs and add following lines of code.

    Here add your Android project's API key.

  • Now go to your iOS project and add the following lines of code.

    • Now the app is configured you can log the errors and events as,