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.
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:
- Add a button containing the Make The Call label and an empty
Button.Clickevent will trigger a call to the
MyBoundServiceservice from the previous recipe and populate the
TextViewwith the answer. ...