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

What is a LocalBroadcastManager ?

Câu trả lời

LocalBroadcastManager is a utility class in Android that allows you to send and receive broadcasts within your own application, without the overhead and security concerns of global broadcasts[1][2][3]. It provides a simple way to communicate between different components of your app, such as activities, services, and fragments[1][3].

Here are the key points about LocalBroadcastManager:

  • It is more efficient than using global broadcasts because the broadcasts are limited to your own application[2][3].
  • It ensures that the broadcast cannot be received by any components outside your application, preventing potential leaks of private or sensitive data[2][3].
  • Other applications cannot transmit broadcasts to your receivers, reducing the risk of security exploits[2].
  • To use it, you need to include the Android Support Library in your application[2][3].
  • You register a receiver in your activity or service's li...
middle

middle

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

senior

What is Doze? What about App Standby?

middle

What is the difference between Adapter and Loader in Android?

senior

Provide some tips to reduce battery usage in an android application

Bình luận

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

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