I’m working on android application which uses WebServices. In that I’m fetchhing images from web and displaying in imageview. It takes time to fetch images from web and sometimes it forcecloses saying “Activity is not responding” and at that time logcat shows warning as
“Key dispatching timed out sending to
com.Test.TestProject/com.Test.TestProject.Activity1
“
I’m not getting why this is happening.Please help me.
Thanks,
Vishakha.
Read the article on painless threading. You are doing the downloading on the UI thread, which will throw ANRs (Activity Not Responding Exceptions) if it hangs for 30 sec or so. You need to do the downloading in a background task, and update the UI on completion.