java - ksoap2 - Same method works wih AsyncTask but no when using inside normal activity -
i'm developing app , has funcionality can used user in 2 different ways: task in real time, he/she have wait till task finishes; or task in background he/she can other things in meanwhile. i've developed task in background asynctask , works, don't know why i'm getting , error when try call same method inside normal activity. this method uses ksoap2, value of param i'm testing " http://www.google.com " public string sendurl(string url) { log.i("url", url); //create request soapobject request = new soapobject(namespace, method_name); request.addproperty("url", url); //create envelope soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.dotnet = false; envelope.implicittypes = true; envelope.setaddadornments(false); envelope.setoutputsoapobject(request); //create http call object httptransportse androidhttptransport = new httptransportse