0

Is there any way to simulate touch events in ADL? If not, how do you properly debug an application that heavily relies on touch events?

matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76

2 Answers2

0

Using a device seems to be the best way, though it also appears this overlaps a previous SO question that describes the same issue in the normal Android Emulator: Is there any way to test multi-touch on the Android Emulator?

Also with regard to code testing you can still write unit tests to test out your objects/methods and verify they have the appropriate input and output. If you're so inclined as to do so you could even have it dispatch events from UI components using code like

//in your code
Multitouch.inputMode=MultitouchInputMode.GESTURE;
someComponent.addEventListener(GestureEvent.GESTURE_TWO_FINGER_TAP, someHandler);

//and in your test
someComponent.dispatchEvent(new GestureEvent(GestureEvent.GESTURE_TWO_FINGER_TAP));
//verify appropriate change occured after a timeout or something of that nature

and should be able to get the appropriate reaction to the event.

more on gesture events here: http://help.adobe.com/en_US/as3/dev/WS1ca064e08d7aa93023c59dfc1257b16a3d6-7ffd.html

more on multi-touch/gestures here as well: http://www.adobe.com/devnet/flash/articles/multitouch_gestures.html

Community
  • 1
  • 1
shaunhusain
  • 19,630
  • 4
  • 38
  • 51
0

You can create multitouch app , run it on Your mobile and send Touch from device using WIFI . This is how Im testing this .

But You can also write emulator that will read MouseEvents from stage and dispatch TouchEvents .

turbosqel
  • 1,542
  • 11
  • 20