Hey guys, I want to use `broadcast receiver` in my...
# compose
k
Hey guys, I want to use
broadcast receiver
in my
composable
function. Is it good idea to create in
viewmodel
? I am little bit concern about passing
activity/ context
in
viewmodel
? Because
viewmodel
has greater
lifecycle
than
composable
. So what is best solution for this?
z
I haven’t really worked with broadcast receivers before but if memory leaks inside your VM is a concern then consider using your application context instead
j
Maybe you can use it with one of SideEffects
k
Can you please give me sideeffect example?
k
ok that's great.. Thanks a million
251 Views