2

Update(2013.08.15) : I managed to emulate touch event using 1. adb shell (slow), 2. Monkey tool(fast but not satisfying) and 3. monkeyrunner (best because I can couple it with python)

I'm trying to create an external device (probably using raspberry pi) which acts as input device for android. Specifically, I want the device to create touch event(touch, swipe... etc). The touch event should be created not only when certain app is activated, but also in background.

I have thought several methods of doing it.

  1. Create an app(probably service) which receives data from the input device and emulate the touch event.(Probably monkeyrunner?)

  2. Connect the android device to the external device and use adb to directly create touch event.

  3. Make the device to mimic the behavior of joystick (I heard that this method only applies to several game apps. is it true?)

Which is the most viable method? Or is any of the method possible? (On rooted phone probably)

PS. For solution 1, I saw several apps (Remote desktop-like apps) which creates touch events using S/W. How does it work?(Using Android API, use adb or misc. methods... etc.)

Thank you for reading this question.

4

0 回答 0