BroadcastReceiver Tutorial Part 7 – LOCAL BROADCAST MANAGER – Android Studio Tutorial
In part 7 of the BroadcastReceiver tutorial, we will learn how to use the LocalBroadcastManager.
The LocalBroadcastManager is a support library class that can register for and send broadcasts within a single app process. While normal broadcasts and broadcast receivers are open to the whole system, local broadcasts don’t leave the app and therefore don’t require any permissions. This is not only more secure, but also more efficient.
The LocalBroadcastManager can only register BroadcastReceivers dynamically in Java code with the registerReceiver and unregisterReceiver methods and an IntentFilter. Manifest-registered, static receivers are not supported. This also means that these receivers cannot be triggered with explicit broadcasts, but only with implicit intent actions.
Watch the whole playlist:
Example code for this part:
https://gist.github.com/codinginflow/0ea638f92c702d9b732af07a6c918e0a
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :14825
android studio