Sanity check. Using Hilt I'm getting some weirdness with my singleton class, and I'm thinking that one expalanation might be that my singleton isn't being scoped correctly.
Does this class signature look right for just having a single instance of shared state or does this require some other annotation?
Copy code
@Singleton
class AppUserManagerService @Inject constructor() {
k
knthmn
05/31/2021, 1:20 AM
Looks fine to me, maybe add a log in
init{}
to see if it is created multiple times?
c
Colton Idle
05/31/2021, 2:38 AM
Thanks for looking at it. I confirmed that init is only called once, and ended up finding my error was due to some fragment lifecycle madness. 🙃