Hey guys, did anyone try writing Repository class ...
# android
b
Hey guys, did anyone try writing Repository class with suspend function where the data is wrapped into NetworkBoundResource(showcased in architecture component sample GithubBrowser) and then exposed to ViewModel.
If yes let's discuss
s
Yes
g
b
@ghedeon dude are you high on something?
@Sr. Android Developer could you share a snippet of your implementation.
d
@bhatnagarm how is that related with Kotlin?
b
@dawidhyzy I asked something related to coroutines. Isn't that related to kotlin?
Guys we are here for sharing our knowledge and try to learn from others, let's maintain the decorum. In case someone finds something wrong it's better to DM to the person in my opinion.
d
I think you need be more specific with your question.
s
May be this might be of some help, have a look “Kotlin Coroutines, From the Basic to the Advanced” https://link.medium.com/sl4yg7BqI4
b
@dawidhyzy I already mentioned the keyword "suspend" which itself brings the context. May be next time I'll specifically mention Kotlin
@Siva Ganesh thanks man for sharing. Let me go thru it
c
Do people actually use NetworkBoundResource ?
b
Well that's a good to have thing
Is there something new out there I'm unaware of
c
I might have less complex situations, but I just used rx calls and composed them instead of creating a new class.
b
Even that's fine there's no standard defined for such things.
But may be you can give it a try, it does it's job really well