Closed mariuspena closed 8 years ago
see the example in the dev summit demo: https://github.com/yigit/dev-summit-architecture-demo/blob/master/client/app/src/main/java/com/android/example/devsummit/archdemo/di/module/ApplicationModule.java#L103
You can assign a dependency injector when you configure the job manager. Unfortunately, Dagger2 does not support base class injection so you'll have to have a custom BaseJob class where there is an onInject method. Then the jobs should call the injector to inject their dependencies when onInject is called.
thank you very much. my main problem was that I was using inject with a BaseJob and Dagger 2. that was a no no.
Hi
Built a job, that uses an injected service (Dagger). Scenario:
What should I do ?
PS: how do I inject the service? something like this: http://stackoverflow.com/questions/35022074/how-do-i-inject-an-object-into-android-priority-job-queue-with-dagger-2