I'm trying to access non static content in the static block, how to do it.
I tried to create an instance of the repository that I want to access which has retrofit OkHttpCall, which is failing when I create a new instance of that service.
I know we have @PostConstruct to use in spring, but it is not recognizing in the android studio, what is the annotation for it in the android?
I need to use non static service which returns a url need to be used in Intent() block.
Here is my Service- ProxyKillSwitchRepository.java
it has a method which calls retrofit enqueue
and this been called in the same service in the method
I'm calling this service in the another activity file SupportWebViewActivity.java in the Intent() and I also want to access in the enum block on this activity
When I debug through it, the instance is getting created and reaching the backend call but it is not coming back with response, it is just returning null as is it coming out the the mWebService.proxyKillSwitch().getAppConfig().enqueue().
I don't see anything it is reaching @Override public void onFailure(), the Is it because of any time with the enqueue call?
I did try to use @Inject annotation on the Service ProxyKillSwitchRepository in the activity SupportWebViewActivity,
protected ProxyKillSwitchRepository proxyKillSwitchRepository;
this is coming fine and I see all the values of it, only problem I can't access this injected field in the enum or static Intent().
How to access the @Inject field in the static block?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop