I am using the ipv6 protocol on my mobile network. API's are not working under ipv6 protocol it is working only on ipv4 protocol. why this occurs?
Is there any solution to work API in ipv6 protocol?
Can anyone help me to resolve this issue?
Haven't tried it myself, but after digging around a bit, can you try the following workaround provided in the Known Issues Section -
Workaround 2: in Android Studio's vmoptions file, change the line -Djava.net.preferIPv6Addresses=true to -Djava.net.preferIPv6Addresses=true
So this issue occurs when the Gradle daemon is trying to use IPv4 instead of IPv6. Also to understand the Networking using ipv6 you should check out this Networking Guide.
Not every server provide ipv6 protocol by default.
And some servers do not support it too. you need to contact your server-provider to get information about whether they are providing ipv6 or not.
Then you need to enable ipv6.
In our case Godadday was not providing ipv6. (I am not sure with today's condition) There are many others which are providing it.
After enable, you will get ipv6 along with ipv4 like below:

Surprisingly application was working over ipv6 after implementing it in Android as well as iOS too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With