I want to return a string value from my function. But I do not know how to handle it? I tried final one-array solution but it did not work out.
Here is my code:
With retrofit2 is possible make synchronous call:
Callback callback = BaseService.getInstance().getUniqueCourt(Session.getToken(),courtID)
Response response = callback.execute();
...
however, synchronous requests trigger app crashes on Android 4.0 or newer. You’ll run into the NetworkOnMainThreadException error.
More information here.