Great Artikle,
Im wondering how can i access the injected App?
I would like to access the App (context) in the NetworkingModule.
In the App we inject the App β¦ component.inject(this)
How can i access that?
Thanks in advance
Hello,
Thanks for kind words! :]
In case you need to access the app context from another module, you can use it from the App singleton, by calling App.instance.
In case you want to provide it through Dagger, you can create an AppModule which receives the context as constructor parameters (as a val), and then provide it using said value.
Then simply include the AppModule in the networking module. :]
Hope this helps!
BreweryDB is closed for developers:
We are not currently accepting applications for public API keys. For commercial licensing opportunities, please contact us at feedback@steadyserv.com.
Hey @namyxc,
Unfortunately, yes, it seems that BreweryDB has closed itβs API for public usage. :[
At the time of writing and publishing of the tutorial, the API was valid, so it seems like a recent change.
Thank you for your feedback, and Iβd like to invite you to stay put, as weβll most definitely update the tutorial to use a different API. With beers, of course. :]
This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!