Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why API's are not working in ipv6 protocol?

Tags:

android

ios

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?

like image 980
M.Neelima Avatar asked Dec 06 '25 03:12

M.Neelima


2 Answers

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.

like image 145
hsm59 Avatar answered Dec 08 '25 17:12

hsm59


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:

enter image description here

Surprisingly application was working over ipv6 after implementing it in Android as well as iOS too.

like image 31
Rumit Patel Avatar answered Dec 08 '25 17:12

Rumit Patel