https://kotlinlang.org logo
Title
a

Anurag Kumar

01/20/2023, 4:46 AM
Hi Team, I need to remove greenrobot event bus from my Kotlin project, Any better approach?
c

Chrimaeon

01/20/2023, 7:15 AM
This is a workspace about the Kotlin programming language. For your general android questions please check the channel description for more appropriate resources.
a

Arun Sudharsan

01/20/2023, 7:46 AM
You can consider rxjava's publish subject
a

Anurag Kumar

01/20/2023, 8:09 AM
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

Mustafa Ozhan

01/20/2023, 10:16 AM
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

rook

01/20/2023, 6:05 PM
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.
a

Anurag Kumar

01/21/2023, 5:53 AM
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