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

Use LocalBroadcastManager instead of context.sendBroadcast() #396

Open
Lir10 opened this issue Jul 2, 2022 · 0 comments
Open

Use LocalBroadcastManager instead of context.sendBroadcast() #396

Lir10 opened this issue Jul 2, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Lir10
Copy link

Lir10 commented Jul 2, 2022

There are few places that we use context.sendBroadcast() which might cause a crash in some devices as suggested in this thread: https://stackoverflow.com/questions/46971153/fatal-exception-android-app-remoteserviceexception-cant-deliver-broadcast-at

We should use LocalBroadcastManager instead to send local broadcasts

https://github.com/adeekshith/watomatic/blob/main/app/src/main/java/com/parishod/watomatic/service/KeepAliveService.java#L71
https://github.com/adeekshith/watomatic/blob/main/app/src/main/java/com/parishod/watomatic/viewmodel/SwipeToKillAppDetectViewModel.java#L40

@mawoka-myblock mawoka-myblock added the enhancement New feature or request label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants