Hi everyone, Let’s say I start an activity with so...
# dagger
c
Hi everyone, Let’s say I start an activity with some bundled data that I’d need way back in the repository. How can I provide that data using Hilt instead of passing it through several ${place_arch_pattern}-components? How do you solve problems like that?
g
You can access Activity in ActivityScope module, and get intent data from it
c
That way I’ll reference the activity in my repo. I’d like work around this.
g
no need to do this on level of repo
add this info to your scope @Named(“some_id”) fun provideId(activity: Activity): String = activity.intent.getStringExtra(“some_id_arg”)
👍 1
c
Ahhh, I see! Thank you so much! 👍🏼
👌 1
Works like charm.