I have a separate thread to render game images at 40-50fps. But
sometimes the key response is slow. For example, though I pressed a
button to move the player, the player would stay still or keep moving
towards the original direction as if no keys were pressed. It will
normally last for about 5-10 seconds. The 'MENU' key is having the
same problem. The menu won't show up until after the 5-10 seconds. I
wrote out debug logs in onKeyDown() and onKeyUp(), and it showed me
they were not called during that peroid, regardless how many times I
pressed the key. And after that period, I would receive all key events
that were occurred during that period.

Is that a problem of OS thread scheduling? or just the event delivery
mechanism is slow on Android? Is there any way I can do to avoid this
from happening? It is really annoying.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to