SocketTimeoutException after converting from http to https in android app

旧时模样 提交于 2019-12-06 14:52:30

Ok i found the issue that was causing the SocketTimeOutException.

It seems that the problem was that I am working from my home and the phone is using the same network that the server is located on. It cannot seem to get to the server using https when this is the case. I turned the phones wireless network off and connected using the phones 3G connnection and hey presto the app connected and validated my URL.

I had similar problems with testing the https connection directly from the server and my work laptop in a web browser. In each case I fixed the issue by adding the www.mydomain.com address into the host file.

I'm now going to look into editing my android phones host file to see if this will solve it as I dont want to use the phones G3 connection for testing as I expect ill get lots of charges...

Ill post a comment below later to say how it goes

I hope this helps anyone else that has similar problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!