Is there any way to inject custom bindings in a class that’s not an activity (a class that doesn’t extends RoboActivitiy? Because everytime I try to inject it, I get a NullPointerException when accessing it.
I’ve solved it getting the injector and doing it by myself… but that’s something I don’t feel comfortable with.
Thanks!
If the class isn’t itself created through injection, then obtaining the injector is the right (and only) way to do it. That’s how
RoboActivity(seeonCreate()) does it in the first place. Objects created through injection get their members Injected by the injector.