Campaign SDK for Xamarin overview

The Mobile app messaging SDK for Xamarin lets you add push notifications to iOS and Android mobile applications that are developed using Xamarin.Forms. You can add basic notifications and advanced notifications, such as banners, video, and calendars. Additionally, the SDK supports integration with the Acoustic Campaign.

Xamarin is a C# codebase that is used to write native iOS and Android mobile applications. With Xamarin.Forms, developers use a single, shared codebase to develop UI elements and business logic that exist in both iOS and Android apps. For example, you can write your UI and business logic against the Xamarin.Forms API and run the API on both iOS and Android. Xamarin.Forms provides the ability to share code by implementing a Portable Class Library (PCL) that contains reusable C# code and bindings that translate platform-specific libraries and APIs to C#.

When you develop mobile applications with Xamarin.Forms, you create a project that contains applications for the shared code library and for the platform-specific code libraries. The shared application contains code that is written in C# against the Xamarin.Forms APIs. The iOS and Android applications are platform-specific implementations that import shared logic from Xamarin.Forms. In the iOS and Android applications, Xamarin-provided bindings translate iOS and Android code libraries to C#.

To enable communications between push notifications and Xamarin-developed applications, the Mobile app messaging SDK for Xamarin provides a cross-platform interface to Xamarin.Forms and platform-specific implementations to the interface. The interface, AcousticMobilePush.Forms, is imported into the shared application, and the platform-specific implementations, AcousticMobilePush.Forms.iOS and AcousticMobilePush.Forms.Droid, and their respective bindings are imported into the iOS and Android applications. The AcousticMobilePush.iOS binding and AcousticMobilePush.Droid binding tie the native iOS and Android libraries to the AcousticMobileForms and Xamarin.Forms libraries.

The following diagram shows how AcousticMobilePush.Forms interacts with Xamarin.Forms.


The Mobile app messaging SDK for Xamarin provides the following libraries and bindings:

  • AcousticMobilePush.iOS – The iOS SDK binding that links the Acoustic iOS platform SDK to your C# code.
  • AcousticMobilePush.Droid – The Android SDK binding that links Acoustic Android platform SDK to your C# code.
  • AcousticMobilePush.Forms – A library that allows a single Xamarin.Forms application to use the native bindings.
  • AcousticMobilePush.Forms.Droid – A library that links the AcousticMobilePush.Forms library to theAcousticMobilePush.Droid library, which is embedded in your Android C# app.
  • AcousticMobilePush.Forms.iOS – A library that links the AcousticMobilePush.Forms library to the AcousticMobilePush.iOS library, which is embedded in your iOS C# app.