Câu hỏi phỏng vấn Android
Câu hỏi

What is the difference between Local , ...

Câu trả lời

Here is the difference between the types of Android broadcasts:

Normal Broadcast:

  • Use sendBroadcast() to send
  • Asynchronous broadcast, any registered receiver can receive it in any order[1][2]

Ordered Broadcast:

  • Use sendOrderedBroadcast() to send
  • Synchronous broadcast, receivers get it one-by-one in priority order
  • Receivers can propagate results or abort the broadcast[1][2][4]

Local Broadcast:

  • Use LocalBroadcastManager to send and receive
  • Optimized for intra-app communication, intents don't cross process boundaries
  • Enhances security by ensuring intents can't be sent/received by other apps[5]

Sticky Broadcast:

  • Use sendStickyBroadcast() to send
  • The broadcast intent stays in a cache after delivery
  • The system re-broadcasts the sticky intent to future registrations
  • Allows quickly retrieving the last sticky broadcast[1][2][3]...
expert

expert

Gợi ý câu hỏi phỏng vấn

middle

When to use Android Loaders?

senior

What is Doze? What about App Standby?

senior

How do you handle Bitmaps in Android as it takes too much memory?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào