Skip to main content
March 16, 2011
Question

ANR keyDispatchingTimedOut (new thread?)

  • March 16, 2011
  • 2 replies
  • 1192 views

Hi

I am getting a ANR keyDispatchingTimedOut error from my app causing it to freeze.

From reading around, it seems this is probably due to running expensive operations on the main thread.  I suspect in my app this is from saving files to SD card.

General Android support suggests pushing these operations into a different thread to keep it off the main thread.  Does anyone know how I can do this using AIR?

Thanks

This topic has been closed for replies.

2 replies

November 13, 2012

Were you ever able to resolve this issue? I'm seeing it too, occasionally.

November 13, 2012

Hi

No I never did - as far as I could tell there was no way to push tasks into different threads in AIR Android.  I was saving audio bytedata to SD card - a heavy process that locked up the UI and the entire app.  My (poor) solution was to add a warning message to make users aware that if the app becomes unresponsive, click 'Wait' as it will, on the whole, get there in the end.  I also warn my users to be wary of recording huge files as it's pushing the limitations of the device.

Sorry I can't help with a real solution.  It's this kind of thing that's forced me over from AIR into pure Android.  You just get so little control in AIR compared to native.

Good luck!