How to handle AsyncTask onPostExecute when paused to avoid IllegalStateException

后端 未结 5 748
灰色年华
灰色年华 2020-11-30 18:44

I appreciate the numerous postings regarding AsyncTask on a rotation change. I have the following problem when using the compatability lib and trying to dismiss a Dial

5条回答
  •  一生所求
    2020-11-30 19:13

    Another way of achieving what you require is to implement the PauseHandler class that I documented in this post.

    Then in your onPostExecute method call sendMessage() to post your message into the handler.

    When your application resumes the action will be handled.

提交回复
热议问题