Hasmukh
Hasmukh

Reputation: 4670

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 or 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.

Upvotes: 0

Views: 3348

Answers (2)

Nikola Despotoski
Nikola Despotoski

Reputation: 50538

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)

Upvotes: 0

Reno
Reno

Reputation: 33792

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.

Upvotes: 2

Related Questions