Why does Hilt @Bind construct a class multiple times? And what is the best practice way of listening to network in a repository?
The Questions:
Could you please suggest a best practice way of getting network connectivity status in a repository that needs to determine from where to fetch data. My min Api is 23.
Why does Hilt construct the class multiple times even if it's supposed to be installed in SingletonComponent?
I have borrowed from a Medium article and built a NetworkStatusManager. It is injected into my DetailsRepository with Hilt through @Binds. This NetworkStatusManager emits a flow when network becomes...