android - Debugging Event code -
if wish debug code ui event, e.g.
public boolean ontouchevent(motionevent me) { // code debugged }
... , hold onto thread (ui):
after 5 seconds warning: key dispatching timed out sending com.hos/com.hos.myactivity ... null window ...
after 20 seconds get: key dispatching timed out sending com.hos/com.hos.myactivity ... null window ... continuing wait key dispatched
after 35 seconds get: key dispatching timed out sending com.hos/com.hos.myactivity ... null window ... timed out expired process next key & find new target
at point, not application frozen phone. quite need wait anr , hard restart phone.
is there way debug code more 35 seconds without freezing app / phone?
if processing may take more milliseconds process may want consider launching processing in thread has access handler in main thread.
once done processing, can pass message on handler execute on ui thread. prevent errors coming make debugging code easier.
if looking automated ui testing framework, perhaps integrating robotium project.
Comments
Post a Comment