Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalBroadcastManager is deprecated #354

Open
GregoryNowik opened this issue Sep 8, 2022 · 1 comment
Open

LocalBroadcastManager is deprecated #354

GregoryNowik opened this issue Sep 8, 2022 · 1 comment

Comments

@GregoryNowik
Copy link

Library version: 2.0.3

This class is deprecated.
LocalBroadcastManager is an application-wide event bus and embraces layer violations in your app: any component may listen events from any other. You can replace usage of LocalBroadcastManager with other implementation of observable pattern, depending on your usecase suitable options may be androidx.lifecycle.LiveData or reactive streams.

https://developer.android.com/reference/androidx/localbroadcastmanager/content/LocalBroadcastManager

as per your documentation :

The service will send local broadcast events using LocalBroadcastManager.

This is preventing me from having a warning-free project.
Is there any plan on the roadmap to implement a different system to communicate between the DFU service and the app ?
I was thinking static flows would be easier to implement and less risky.

@philips77
Copy link
Member

There's a lot of deprecated code in this project, including the fact that it runs in an IntentService. The lib would have to be rewritten to remove all the warnings.
The library was written very long time ago, but still works, despite all the warnings. New one would have less warnings, but more bugs, I suppose :)
We may think of migrating it to Kotlin at some point, but don't have time in the near future, sorry!

@philips77 philips77 added enhancement and removed bug labels Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants