Hi Team, I need to remove greenrobot event bus fro...
# android
a
Hi Team, I need to remove greenrobot event bus from my Kotlin project, Any better approach?
😶 2
c
This is a workspace about the Kotlin programming language. For your general android questions please check the channel description for more appropriate resources.
👍 1
a
You can consider rxjava's publish subject
a
I am looking for Kotlin API's only, I guess i can use SharedFlow, But looking for any good article if some one did already ?
m
SharedFlow is the only alternative that i know, if you would like to keep same structure, you can use some sealed class for Events
r
Just wanted to dip in here to say, this question has been unjustly flagged as “not kotlin”. It’s a question about replacing an event bus library with a Kotlin standard library alternative. Kotlin has tools that can help solve this problem. Thank you to @Mustafa Ozhan for a good answer. To answer the question,
SharedFlow
is one of the best ways to accomplish the behavior. If you have questions about the specifics of implementation, we would need to know more about what specifically you’re trying to accomplish that you suspect
SharedFlow
would not be able to fulfill.
👊 4
a
Thanks @Mustafa Ozhan and @rook It's Kotlin specific question only, I will try to replace greenrobot with SharedFlow as greenrobot lib not updated since 2021. Will let you know guys if i face any issue
👍 1