I have already set a connection with API, everything seems to be working but I need to set a timeout for data to show. I have checked the answers from before here on StackOverflow, but none of the methods seem to fit. Do you know any way of how to set the timeout right?
I tried several codes from these answers (How to set connection timeout with OkHttp) and there was always some issues with it. At this point, I have an error that says that it cannot resolve the method setReadConnection
OkHttpClient client = new OkHttpClient.Builder().setReadTimeout(30, TimeUnit.SECONDS).build();
I was just hoping that this would help me to finally show the data in the app. Thanks for any tips