Until now, we have been only receiving broadcasts. And all those intents we have experimented with are the Android System broadcasts. In this section, we will talk about custom broadcasts. We will see how we can send our own custom broadcasts to other applications and how other applications can listen for our custom broadcast intents.
In the next section, we will create an example that will send custom broadcasts to other applications. Let's create the activity and layout file for the application now.
The activity_main.xml file represents the layout file of our activity. The following code shows the implementation of the manifest file:
As you can see in the layout file, we have ...