How do I force my android app to use ipv4 instead of ipv6?

Viewed 3693

I'm having problems with my app when making REST requests using retrofit + okhttp on ipv6 networks. The response time appears to be very high when connected to ipv6 networks (approximately 10 seconds for each request). Can you tell me if there is any way to limit the app so that it prioritizes ipv4 networks? I know that this can impact the usability of the app, but the app is for use in more restricted environments, it is not for the general public.

1 Answers
Related