Notifications in Xamarin.Android

PDF for offline use:
Sample Code:

Let us know how you feel about this.


0/250
Thanks for the feedback!

last updated: 2016-11

Overview

This section shows how to implement notifications in Xamarin.Android. It will explain the various UI elements of an Android notification and discuss the API's involved with creating and displaying a notification.

Sections

Local Notifications In Android

This section explains how to implement local notifications in Xamarin.Android. It describes the various UI elements of an Android notification and discuss the API's involved with creating and displaying a notification.

Walkthrough - Using Local Notifications in Xamarin.Android

This walkthrough covers how to use local notifications in a Xamarin.Android application. It demonstrates the basics of creating and publishing a notification. When the user clicks on the notification in the notification drawer it starts up a second Activity.

Google Cloud Messaging

This section provides a high-level overview of how Google Cloud Messaging routes messages between your app and an app server, and it provides a step-by-step procedure for acquiring credentials so that your app can use GCM services.

Walkthrough - Remote Notifications with Google Cloud Messaging

This section provides a step-by-step explanation of how to implement remote notifications in Xamarin.Android using Google Cloud Messaging. It explains the various components that must be leveraged to enable Google Cloud Messaging in an Android application.

Firebase Cloud Messaging

Firebase Cloud Messaging (FCM) is a service that facilitates messaging between mobile apps and server applications. FCM is Google's successor to Google Cloud Messaging. This article provides an overview of how FCM works, and it provides a step-by-step procedure for acquiring credentials so that your app can use FCM services.

Walkthrough - Remote Notifications with Firebase Cloud Messaging

This walkthrough provides a step-by-step explanation of how to use Firebase Cloud Messaging to implement remote notifications (also called push notifications) in a Xamarin.Android application. It illustrates how to implement the various classes that are needed for communications with Firebase Cloud Messaging (FCM), provides examples of how to configure the Android Manifest for access to FCM, and demonstrates downstream messaging using the Firebase Console.

For Further Reading

Notifications – This Android Developer topic is the definitive guide for Android notifications. It includes a design considerations section that helps you design your notifications so that they conform to the guidelines of the Android user interface. It provides more background information about preserviing navigation when starting an Activity, and it explains how to display progress in a notification and control media playback on the Lock Screen.

NotificationListenerService – This Android service makes it possible for your app to listen to (and interact with) all notifications posted on the Android device, not just the notifications that your app is registered to receive. Note that the user must explicitly give permission to your app for it to be able to listen for notifications on the device.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.