How to set a priority of retrofit requests
How to set a priority of retrofit requests I have ViewPager and in this ViewPager there are 4 fragments. Sorry but I can't to add a code, because that would be very big. Each of my fragments on create does asynchronous retrofit request to server. I have access_token and refresh_token too. So when my access_token expires I need to do a call using refresh_token to update my access_token . So when I launch my application it opens viewPager with my 4 fragments doing asynchronous requests. That means 4 requests at a time. And when my access_token is expired and I'm launching my app, all the fragments try to update the access token using refresh token. Turns out that one fragment updates the access_token (after the update refresh_token changes) other fragments try to update the token too, but I'm getting 401 because 1 fragment already updated the token and other fragments try to update the access_token using old refresh token. ViewPager access_token refresh_token access_tok...