ERROR/ActivityManager(98): Reason: keyDispatchingTimedOut
i playing live video from api in my app. when i click play video then Progress dialog will come in between progress when i press back button 2 o开发者_StackOverflowr 3 times of device then after some times it will give this error
ERROR/ActivityManager(98): Reason: keyDispatchingTimedOut
so how i can handle this error plz give me solution. Thnax in advace.
This happens due to many reasons. I can't diagnose without your stack traces.
The most common reason for this error is when you are doing an CPU intensive task in a UI thread. Use threading or AsyncTask to delegate such CPU intensive work.
Is any ANR thrown? If so go in DDMS->File Explorer -> data/anr/traces.txt
and check at which point ANR occurred.
keyDispatchingTimedOut
when you are doing heavy calculation on main thread. Move what you are doing in a new background thread (if possible)
精彩评论