Problems in Calling AsyncTask from IntentService

后端 未结 5 1449
别跟我提以往
别跟我提以往 2021-01-05 22:24

I have created IntentService class and performing asyncTask but getting exception when onPreExecute() is called at this code line

5条回答
  •  温柔的废话
    2021-01-05 22:43

    Service isn't a UI thread.
    Since you try to display a ProgressDialog from a service context, it can't be completed.
    Try this solution:
    https://stackoverflow.com/a/4369755/1405268

提交回复
热议问题