Xamarin.Insights.Initialize Method
Initialize is used to connect the application with the Insights Server before any collecting of analytics and crash reporting can be done.

Syntax

public static void Initialize (string apiKey)

Parameters

apiKey
The unique API key that is automatically generated for an application when it is added to the Xamarin Insights Web Portal.

Remarks

The process of registering an application with Xamarin Insights differs based on the platform being developed for. When including Xamarin Insights in a Xamarin.Android mobile application, Registration should be performed in the Launch Activity (this is the Activity with MainLauncher = true in it's definition code). Alternatively, if a singleton model is being employed, the registration can called from there. When including Xamarin Insights in a Xamarin.iOS mobile or Xamarin.Mac desktop application, registration should occur within the static Main() method in Application class. When including Xamarin Insights in a Windows Phone application, registration should occur when the application first launches. When including Xamarin Insights in a Xamarin.Forms mobile application, perform the registration in the platform-specific application projects of a Xamarin.Forms solution. After the registration has occurred, calling the remaining Xamarin Insights methods can be handled from within the Xamarin.Forms PCL or Shared Project code.

Requirements

Namespace: Xamarin
Assembly: Xamarin.Insights (in Xamarin.Insights.dll)
Assembly Versions: 0.2.0.0, 1.0.0.0