AsyncTask HttpPost execute fails on 3G, but works on Wifi

前端 未结 8 698
深忆病人
深忆病人 2021-01-04 06:39

I need to do a Http post of some strings to a web service. I am using KSoap.

@Override
protected JSONObject doInBackground(JSONObject... params) {
    String         


        
8条回答
  •  梦毁少年i
    2021-01-04 07:17

    You could try to connect to your server via the web browser of your phone to see if the problem is within your application or if the problem is a 3G problem resolving/connecting to the address of your server.

    My guess is that you won't be able to connect either via a web browser.

    Where is hosted your web service? Should it be accessible from an external network ? You may be able to connect to your server via wifi if the server is in the same network.

提交回复
热议问题