Make sure NuGet is installed in Visual Studio, then right-click on your project and select “Manage NuGet Packages…” Make sure you’re in the “Online” section in the left hand pane. Then, in the top right search box, search for Mindscape.Raygun4Net.Xamarin.Android and install it.

Alternatively, visit here for instructions on installation using the package manager console.


In the main Activity of your application, initialize the RaygunClient and attach the Real User Monitoring feature. Your app API key is displayed when you create a new application in your Raygun account, or when you unlock Real User Monitoring for an existing app, or can be viewed in the “Application settings”.

protected override void OnCreate(Bundle bundle)

  // Your code

If you have previously enabled Raygun Crash Reporting in your app, you may notice the code above is using a new RaygunClient API. Previously, crash reporting was set up via the static RaygunClient.Attach method which takes your Raygun app API key. The RaygunClient now has a static Initialize method, and subsequent AttachPulse and AttachCrashReporting functions that have their own options and can be chained together.

The old and new methods are compatible with each other, but we recommend using the new Initialize, AttachPulse and AttachCrashReporting methods so that you only need to pass your Raygun app API key once.

Provide a user identifier

By default, the Raygun provider will give a unique guid to each user for distinguishing between them. If possible, we highly recommend providing your own unique identifiers for your users which can be done with the code below. The string you pass into the constructor can be whatever unique user id that works best for you - email address is a recommended example. Providing the first name and full name is optional.

RaygunClient.Current.UserInfo = new RaygunIdentifierMessage(emailAddress) {
  FirstName = firstName,
  FullName = fullName

Real User Monitoring messages will be sent to Raygun as soon as the app starts up. So once you’ve set up Real User Monitoring in your app, run it up and go to your Real User Monitoring dashboard to see the data it collects. Of course Real User Monitoring is most valuable once your app is out there in the store.

Network calls

You can manually log the timings of network calls using the following Raygun4Net API.

RaygunClient.Current.SendPulseTimingEvent(RaygunPulseEventType.NetworkCall, "GET", 1234);

The name string can be whatever works best for you - the HTTP method and url is a recommended example. The duration is the milliseconds that you’ve measured the network call to take.

Details about the network calls that you log can be found in the Performance tab of your Real User Monitoring for mobile dashboard.