Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use dependency injection in an activity. #151

Open
SangeetaGulia opened this issue Sep 28, 2016 · 2 comments
Open

How to use dependency injection in an activity. #151

SangeetaGulia opened this issue Sep 28, 2016 · 2 comments

Comments

@SangeetaGulia
Copy link

No description provided.

@pocorall
Copy link
Owner

Would you describe your issue in more detailed?

@SangeetaGulia
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants