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.
Share
You are probably downloading emails on the main UI thread. You should definitely use a separate thread or
AsyncTaskto accomplish the download, then update the main UI when the download is complete.Read here on using
AsyncTaskto perform network operations off the main UI thread: http://developer.android.com/training/basics/network-ops/connecting.html