How to implement a ProgressDialog while Activity requests a SoapObject from a Web Service?

后端 未结 4 1804
既然无缘
既然无缘 2021-01-21 09:06

I know that ProgressDialog with Threads questions have been asked many times but none of the solutions seem to work for my project. Basically what I want to do is this: 1) when

4条回答
  •  渐次进展
    2021-01-21 09:52

    For your last problem, put "Looper.prepare();" into your run() method.

            @Override
            public void run() {
                Looper.prepare();
                authenticate(); // method that calls the API via SOAP
                authenticateReal(); // method that handles the response
            }
    

    Did you check if your response in your authenticate() method is working correctly? (using LogCat to display the response)

    Otherwise, better use AsyncTask (like suggested).

提交回复
热议问题