Unordered broadcast is a completely asynchronously executed broadcast. It is sent through the Context.sendBroadcast() method. After the broadcast is sent out, all broadcast receivers listening to the broadcast event will receive the broadcast at almost the same time. There is no sequential order. The broadcast receiver will exist throughout the running of the program and will not be logged out. When the program is killed, it will no longer receive broadcasts. Its registration method is to register in the AndroidManifast.xml of your application. This registration method is usually called static registration. This method can be understood as the broadcast registered through the manifest file is handed over to the operating system for processing.
Create a MysendBroadcast() method that includes an intent filter object for which to configure the specified channel.
Add two broadcast receivers, MyReceiver01 and MyReceiver02, respectively, and override the onReceive method.
Configure AndroidManifest and add MyReceiver01 and MyReceiver02 intent filters respectively, where name="com.fengdashao" is the name of the ManinActivity setting channel and must point to this name.
Execute the running program and receive MyReceiver01 and MyReceiver02 respectively. The next issue will explain another registration method - dynamic registration. Corresponding to the static registration of this issue, if you have any questions, please pay attention and communicate together.
Static registration for out-of-order broadcasts