Send notifications from your service

In this short recipe, you will learn how to send notifications from the services that we created earlier. Our objective will be to create an application where the call to an Android-bound service is done manually through a button. The notification will inform the user that the service is correctly bound, and the call can safely be made.

Getting ready

For this recipe, we will reuse the code from the recipe related to the bound service.

How to do it...

Let's take a look at these steps:

  1. Add a button containing the Make The Call label and an empty TextView to the MainActivity class. The Button.Click event will trigger a call to the MyBoundService service from the previous recipe and populate the TextView with the answer. ...

Get Xamarin Studio for Android Programming: A C# Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.