scaloid
scaloid copied to clipboard
How to use dependency injection in an activity.
Would you describe your issue in more detailed?
I am trying to do it like this : class SomeActivity @Inject()(someActivityHelper: someActivityHelper) extends SActivity with SContext
but when i try to create intent as : val intent = SIntent[SomeActivity]
it gives me error as : Cannot instantiate SomeActivity .... no default contructor found.
I believe it is due to the fact that SomeActivity uses SomeActivityHelper and i am unable to pass it when i create intent.
What can be the possible ways to deal with it? Any help will be appreciated.