Android Basics (4)--Broadcast receivers

Source: Internet
Author: User

Each application in Android can register its own broadcasts of interest so that the program will only receive the broadcast content that it cares about, either from the system or from other applications. Android provides a complete set of APIs that allow applications to freely send and receive broadcasts. Sending a broadcast is the use of a previously known intent, and a broadcast receiver (broadcast receiver) is required to receive the broadcast.

1. Type of broadcast

  • Standard broadcast : Normal broadcast, is a fully asynchronous broadcast, after the broadcast, all broadcast receivers almost all at the same time to receive this broadcast message, so they do not have any sequencing Can say. This broadcast is more efficient and also means that it cannot be truncated .
  • Orderly broadcast : Ordered broadcast, is a synchronous broadcast, after the broadcast, only one broadcast receiver will be able to receive this broadcast at the same time, when the logic in this broadcast receiver is executed, The broadcast will continue to pass. So at this time the broadcast receiver is sequential , the priority of the broadcast receiver can first accept the broadcast message, and the front of the broadcast receiver can also truncate the broadcast is being delivered , so that the subsequent broadcast receiver will not be able to receive broadcast messages.

Android Basics (4)--Broadcast receivers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.