December 17, 2018
androidx.localbroadcastmanager is being deprecated in version
LocalBroadcastManageris an application-wide event bus and embraces layer violations in your app; any component may listen to events from any other component.
- It inherits unnecessary use-case limitations of system
BroadcastManager; developers have to use
Intenteven though objects live in only one process and never leave it. For this same reason, it doesn’t follow feature-wise
These add up to a confusing developer experience.
- You can replace usage of
LocalBroadcastManagerwith other implementations of the observable pattern. Depending on your use case, suitable options may be
LiveDataor reactive streams.