Issue
[for Android platform]
Is there any way to inject dependencies into JobService subclass?
In order to compile JobService subclass must not contain constructor with parameters and from the documentation you can only use SetExtras to send some simple data to it.
So what should I do in order to use a service that is in a DI container, resolve it using IServiceProvider or something else?
Solution
As per discussion I found on reddit it constructor injection is a common issue with Android activities/services etc. but there seems to be a workaround by using dependency resolver the way James Montemagno describes it here.
Answered By - 0wl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.