Broadcast Receiver in Android
Hello friends hi. This post is regarding all about Broadcast Receiver in Android. Broadcast Receiver is one of the four main component of Android application. So let's start... Broadcast Receivers can send or receive messages from other application or from the system itself. These messages can be an event or an Intent. For example:- Android system sends broadcasts when system events occur such as system boots up, device starts charging low battery. Furthermore , apps can send custom broadcasts to notify other apps( data download completed ). Apps can receive broadcasts in two ways: a)- Manifest-declared receivers( Statically ) b)- Context-registered receivers( Dynamically ) a)- Manifest-declared receivers( Statically ):- The registration is done in the manifest file, using <register> tags. Firstly , specify the receiver in your manifest file. <receiver android:name=". MyBroadcas...