DOCUMENTATION

Xamarin.Android, Xamarin.iOS and Xamarin.Forms

Logify Alert provides clients for Xamarin.Android and Xamarin.iOS applications. If you develop a Xamarin.Forms application, add the Xamarin.Android and Xamarin.iOS clients to your solution's Android and iOS projects, respectively.

See the basic setup steps below to get started with the Logify Alert service:

Generate an API Key

The Logify Alert service uses unique identifiers – API keys – to register and monitor individual applications. You will use this key later when creating an instance of Logify Alert client in code.

  1. Log in to the Logify Alert website: logify.devexpress.com.

  2. Switch to the Applications tab and click Create New Application.

  3. Specify the application name and description, then click Create.

  4. The Applications tab will now display a new entry with an auto-generated API key.

Send Reports to Logify Alert

This section explains how to make your Xamarin.Android and Xamarin.iOS applications send unhandled exceptions to the Logify Alert service.

Add the Logify Alert Client to Your Project

Visual Studio

  1. Right-click your Xamarin.Android project in Solution Explorer and select Manage NuGet Packages...

  2. Search for Logify.Alert.Xamarin.Android in the nuget.org package source and click Install.

Visual Studio for Mac

  1. In your Xamarin.Android project, right-click the Packages folder and select Add Packages...

  2. In the invoked Add Packages dialog, search for Logify.Alert.Xamarin.Android in the nuget.org package source and click Add Package.

Send Reports Automatically

In your application's main activity file, set up the Logify Alert client and call its StartExceptionsHandling method at the beginning of the onCreate method to automatically intercept all unhandled exceptions and send the corresponding crash reports to Logify Alert.

using DevExpress.Logify.Xamarin; // ... LogifyAlert client = LogifyAlert.Instance; client.ApiKey = "SPECIFY_YOUR_API_KEY_HERE"; client.StartExceptionsHandling();

Send Reports Manually

Use the following code to catch exceptions and send reports manually.

using DevExpress.Logify.Xamarin; // ... try {   // Some code } catch (Exception ex){   LogifyAlert client = LogifyAlert.Instance;   client.ApiKey = "SPECIFY_YOUR_API_KEY_HERE";   client.Send(ex); }

Rebuild and Run Your Application

Once your updated application has been redeployed, log in to logify.devexpress.com to review and process incoming reports.

Add the Logify Alert Client to Your Project

Visual Studio

  1. Right-click your Xamarin.iOS project in Solution Explorer and select Manage NuGet Packages...

  2. Search for Logify.Alert.Xamarin.iOS in the nuget.org package source and click Install.

Visual Studio for Mac

  1. In your Xamarin.iOS project, right-click the Packages folder and select Add Packages...

  2. In the invoked Add Packages dialog, search for Logify.Alert.Xamarin.iOS in the nuget.org package source and click Add Package.

Send Reports Automatically

In the Main.cs file, set up the Logify Alert client and call its StartExceptionsHandling method at the beginning of the Main method to automatically intercept all unhandled exceptions and send the corresponding crash reports to Logify Alert.

using DevExpress.Logify.Xamarin; // ... LogifyAlert client = LogifyAlert.Instance; client.ApiKey = "SPECIFY_YOUR_API_KEY_HERE"; client.StartExceptionsHandling();

Send Reports Manually

Use the following code to catch exceptions and send reports manually.

using DevExpress.Logify.Xamarin; // ... try {   // Some code } catch (Exception ex){   LogifyAlert client = LogifyAlert.Instance;   client.ApiKey = "SPECIFY_YOUR_API_KEY_HERE";   client.Send(ex); }

Rebuild and Run Your Application

Once your updated application has been redeployed, log in to logify.devexpress.com to review and process incoming reports.

Terms of use Copyright © 2016-2023 Developer Express Inc.