O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required