Not sure if I asked the question correctly, but the point is ...
There is an application where there are more than 30 different requests.
All requests are implemented in one separate class with a constructor, each as a separate method using okhttp.
According to the onFailure
in onFailure
or in onResponse
result is processed in different ways:
For example:
Activity1 - > запрос -> onsuccess -> act1.finish();
In Activity1 - public static act1 = this;
- Or
Activity2 - > запрос -> onsuccess -> view1.visible=Gone
;
In Activity2 -> public static view1 = view;
Etc.....
Question: how to correctly and correctly implement this interaction scheme ...?