阅读电子邮件应用程序编程没有回应消息 [英] Reading email programmatically app not responding message
问题描述
我可以以编程方式而不是阅读电子邮件没有问题。 应用程序没有响应消息对话框弹出。点击等待后,应用程序工作正常。我该如何解决这个问题,因为我只是不能让过去的这一点。每次我在阅读电子邮件时,应对该对话框。发送工作正常。我AP preciate你的帮助。
I was able to read emails programmatically but not without a problem. The "app not responding" message dialog box pops up. After clicking wait the app works fine. How do I resolve this problem because I just could not get past this. Every time I have to respond to this dialog when reading emails. Sending works fine. I appreciate your help.
推荐答案
您在主UI线程上可能下载电子邮件。你一定要使用一个单独的线程或的AsyncTask
来完成下载,然后在下载完成后更新主UI。
You are probably downloading emails on the main UI thread. You should definitely use a separate thread or AsyncTask
to accomplish the download, then update the main UI when the download is complete.
在这里阅读关于使用的AsyncTask
来执行网络操作在离主UI线程:的 http://developer.android.com/training/basics/network-ops/connecting.html
Read here on using AsyncTask
to perform network operations off the main UI thread: http://developer.android.com/training/basics/network-ops/connecting.html
这篇关于阅读电子邮件应用程序编程没有回应消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!